fix: robust flag parsing and force 127.0.0.1 in server-install.sh
This commit is contained in:
parent
8898b12ab0
commit
d23d4b9b97
@ -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}"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user