mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-22 11:13:26 +00:00
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.
This commit is contained in:
+8
-1
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user