Fix port selection

This commit is contained in:
Elizabeth Cray 2024-08-19 20:18:33 -04:00
parent 837c10eb21
commit 32d3020421

View File

@ -148,7 +148,9 @@ if [[ "$ARG_PORT" == 0 ]]; then
while [ ! -f "${MANUAL_FILE}" ]; do 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) 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 done
DEVICE="/dev/serial/by-id/$MANUAL_FILE" DEVICE="$MANUAL_FILE"
else
DEVICE="/dev/serial/by-id/$DEVICE"
fi fi
else else
echo.ICyan "Using passed serial port" 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 if [ ! -f /etc/nginx/conf.d/upstreams.conf ]; then
sudo cp $ROOT_DIR/config/nginx/upstreams.conf /etc/nginx/conf.d/upstreams.conf sudo cp $ROOT_DIR/config/nginx/upstreams.conf /etc/nginx/conf.d/upstreams.conf
sudo chown root:root /etc/nginx/conf.d/upstreams.conf sudo chown root:root /etc/nginx/conf.d/upstreams.conf
else else
echo.ICyan "upstreams.conf already exists" echo.ICyan "upstreams.conf already exists"
fi fi
if [ ! -f /etc/nginx/sites-available/site.conf ]; then if [ ! -f /etc/nginx/sites-available/site.conf ]; then
sudo cp $ROOT_DIR/config/nginx/site.conf /etc/nginx/sites-available/site.conf sudo cp $ROOT_DIR/config/nginx/site.conf /etc/nginx/sites-available/site.conf
sudo chown root:root /etc/nginx/sites-available/site.conf sudo chown root:root /etc/nginx/sites-available/site.conf
else else
echo.ICyan "site.conf already exists" echo.ICyan "site.conf already exists"
fi fi
if [ ! -f /etc/nginx/conf.d/common_vars.conf ]; then 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 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 sudo chown root:root /etc/nginx/conf.d/common_vars.conf
else else
echo.ICyan "common_vars.conf already exists" echo.ICyan "common_vars.conf already exists"
fi 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" echo.Red "NGINX config not enabled, don't forget to symlink the site.conf file from sites-available to sites-enabled"
else else
sudo systemctl start nginx sudo systemctl start nginx
fi fi