From 35df5d7444bd759725729d649699236f562c019d Mon Sep 17 00:00:00 2001 From: Pulse Monitor Date: Sat, 23 Aug 2025 23:34:26 +0000 Subject: [PATCH] fix: unbound FRONTEND_PORT variable error after update The install script was failing with 'unbound variable' error after completing an update because FRONTEND_PORT is only set during fresh installations. Now extracts port from service file or uses default. --- install.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 025a11834..41a61af90 100755 --- a/install.sh +++ b/install.sh @@ -802,11 +802,18 @@ start_pulse() { print_completion() { local IP=$(hostname -I | awk '{print $1}') + # 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 + # 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 + echo print_header print_success "Pulse installation completed!" echo - echo -e "${GREEN}Access Pulse at:${NC} http://${IP}:${FRONTEND_PORT}" + echo -e "${GREEN}Access Pulse at:${NC} http://${IP}:${PORT}" echo echo -e "${YELLOW}Useful commands:${NC}" echo " systemctl status $SERVICE_NAME - Check service status"