From 69a4369efe66512d19fc3ca04aaaf5593a847b58 Mon Sep 17 00:00:00 2001 From: Pulse Monitor Date: Sun, 24 Aug 2025 07:44:58 +0000 Subject: [PATCH] fix: protect FRONTEND_PORT reference from unbound variable error Added parameter expansion protection to prevent 'unbound variable' error when checking if FRONTEND_PORT is empty during updates. --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 41a61af90..982cd8f4c 100755 --- a/install.sh +++ b/install.sh @@ -760,7 +760,7 @@ Environment="PULSE_DATA_DIR=$CONFIG_DIR" EOF # Add port configuration if not default - if [[ "$FRONTEND_PORT" != "7655" ]]; then + if [[ "${FRONTEND_PORT:-7655}" != "7655" ]]; then cat >> /etc/systemd/system/$SERVICE_NAME.service << EOF Environment="FRONTEND_PORT=$FRONTEND_PORT" EOF @@ -804,7 +804,7 @@ print_completion() { # Get the port from the service file or use default local PORT="${FRONTEND_PORT:-7655}" - if [[ -z "$FRONTEND_PORT" ]] && [[ -f "/etc/systemd/system/$SERVICE_NAME.service" ]]; then + if [[ -z "${FRONTEND_PORT:-}" ]] && [[ -f "/etc/systemd/system/$SERVICE_NAME.service" ]]; then # Try to extract port from service file PORT=$(grep -oP 'FRONTEND_PORT=\K\d+' "/etc/systemd/system/$SERVICE_NAME.service" 2>/dev/null || echo "7655") fi