From d23d4b9b97c42d110f1f507612780daa3fee7785 Mon Sep 17 00:00:00 2001 From: Haitao Pan Date: Tue, 3 Feb 2026 02:56:46 +0800 Subject: [PATCH] fix: robust flag parsing and force 127.0.0.1 in server-install.sh --- scripts/server-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/server-install.sh b/scripts/server-install.sh index 6cc6ad2..bc8f9cc 100644 --- a/scripts/server-install.sh +++ b/scripts/server-install.sh @@ -12,7 +12,7 @@ DOMAIN="$(hostname)" # Handle flags AUTO_YES=false -while [[ "$1" =~ ^- ]]; do +while [[ "$#" -gt 0 && "$1" == -* ]]; do case "$1" in -y|--yes) AUTO_YES=true; shift ;; *) break ;; @@ -120,8 +120,8 @@ fi # Run Configure automatically if [ -f "./configure" ]; then - echo -e "${BLUE}Running configure (auto-detecting IP)...${NC}" - ./configure -n || { echo -e "${RED}Error: Configure failed${NC}"; exit 1; } + echo -e "${BLUE}Running configure (forcing 127.0.0.1)...${NC}" + ./configure -n -i 127.0.0.1 || { echo -e "${RED}Error: Configure failed${NC}"; exit 1; } fi echo -e "${GREEN}Installation and configuration successful!${NC}"