From a31ebd1e7df71cca46f07835d67e1ed8bcac9c64 Mon Sep 17 00:00:00 2001 From: Pulse Monitor Date: Sat, 23 Aug 2025 23:02:12 +0000 Subject: [PATCH] fix: install script no longer prompts for port during updates The script now checks for existing installations before asking for configuration. Updates will skip all prompts and just update the binary. --- install.sh | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/install.sh b/install.sh index 62d5fe313..136802263 100755 --- a/install.sh +++ b/install.sh @@ -831,23 +831,7 @@ main() { detect_os check_docker_environment - # Ask for port configuration (non-container installs) - local FRONTEND_PORT=${FRONTEND_PORT:-} - if [[ -z "$FRONTEND_PORT" ]]; then - if [[ "$IN_CONTAINER" == "true" ]]; then - # In container mode, use default port without prompting - FRONTEND_PORT=7655 - else - echo - safe_read "Frontend port [7655]: " FRONTEND_PORT - FRONTEND_PORT=${FRONTEND_PORT:-7655} - if [[ ! "$FRONTEND_PORT" =~ ^[0-9]+$ ]] || [[ "$FRONTEND_PORT" -lt 1 ]] || [[ "$FRONTEND_PORT" -gt 65535 ]]; then - print_error "Invalid port number. Using default port 7655." - FRONTEND_PORT=7655 - fi - fi - fi - + # Check for existing installation FIRST before asking for configuration if check_existing_installation; then # Get both stable and RC versions local STABLE_VERSION=$(curl -s https://api.github.com/repos/$GITHUB_REPO/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' 2>/dev/null) @@ -981,7 +965,23 @@ main() { ;; esac else - # Fresh installation + # Fresh installation - ask for port configuration + FRONTEND_PORT=${FRONTEND_PORT:-} + if [[ -z "$FRONTEND_PORT" ]]; then + if [[ "$IN_CONTAINER" == "true" ]]; then + # In container mode, use default port without prompting + FRONTEND_PORT=7655 + else + echo + safe_read "Frontend port [7655]: " FRONTEND_PORT + FRONTEND_PORT=${FRONTEND_PORT:-7655} + if [[ ! "$FRONTEND_PORT" =~ ^[0-9]+$ ]] || [[ "$FRONTEND_PORT" -lt 1 ]] || [[ "$FRONTEND_PORT" -gt 65535 ]]; then + print_error "Invalid port number. Using default port 7655." + FRONTEND_PORT=7655 + fi + fi + fi + install_dependencies create_user setup_directories