From 32d3020421db1bdd19e94e065ae98fd32288dbaf Mon Sep 17 00:00:00 2001 From: Liz Cray Date: Mon, 19 Aug 2024 20:18:33 -0400 Subject: [PATCH] Fix port selection --- setup.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/setup.sh b/setup.sh index a168962..3760d0a 100755 --- a/setup.sh +++ b/setup.sh @@ -148,7 +148,9 @@ if [[ "$ARG_PORT" == 0 ]]; then while [ ! -f "${MANUAL_FILE}" ]; do MANUAL_FILE=$(dialog --backtitle "drwho@hackers.town" --title "Manual Device Selection" --inputbox "Enter Full Device File Path" 8 40 "${MANUAL_FILE}" 3>&1 1>&2 2>&3) done - DEVICE="/dev/serial/by-id/$MANUAL_FILE" + DEVICE="$MANUAL_FILE" + else + DEVICE="/dev/serial/by-id/$DEVICE" fi else echo.ICyan "Using passed serial port" @@ -206,21 +208,21 @@ echo.ICyan "Installing base nginx configs" if [ ! -f /etc/nginx/conf.d/upstreams.conf ]; then sudo cp $ROOT_DIR/config/nginx/upstreams.conf /etc/nginx/conf.d/upstreams.conf sudo chown root:root /etc/nginx/conf.d/upstreams.conf -else +else echo.ICyan "upstreams.conf already exists" fi if [ ! -f /etc/nginx/sites-available/site.conf ]; then sudo cp $ROOT_DIR/config/nginx/site.conf /etc/nginx/sites-available/site.conf sudo chown root:root /etc/nginx/sites-available/site.conf -else +else echo.ICyan "site.conf already exists" fi if [ ! -f /etc/nginx/conf.d/common_vars.conf ]; then sudo cp $ROOT_DIR/config/nginx/common_vars.conf /etc/nginx/conf.d/common_vars.conf sudo chown root:root /etc/nginx/conf.d/common_vars.conf -else +else echo.ICyan "common_vars.conf already exists" fi @@ -319,4 +321,4 @@ if [ ! -f /etc/nginx/sites-enabled/site.conf ]; then echo.Red "NGINX config not enabled, don't forget to symlink the site.conf file from sites-available to sites-enabled" else sudo systemctl start nginx -fi \ No newline at end of file +fi