mirror of
https://github.com/buildplan/du_setup.git
synced 2025-12-29 16:14:59 +00:00
default to detected port
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
|
||||
**Version:** v0.70
|
||||
|
||||
**Last Updated:** 2025-10-14
|
||||
**Last Updated:** 2025-10-18
|
||||
|
||||
**Compatible With:**
|
||||
|
||||
|
||||
@@ -1335,7 +1335,8 @@ collect_config() {
|
||||
while true; do
|
||||
read -rp "$(printf '%s' "${CYAN}Enter custom SSH port (1024-65535) [$PROMPT_DEFAULT_PORT]: ${NC}")" SSH_PORT
|
||||
SSH_PORT=${SSH_PORT:-$PROMPT_DEFAULT_PORT}
|
||||
if validate_port "$SSH_PORT"; then break; else print_error "Invalid port number."; fi
|
||||
if validate_port "$SSH_PORT" || [[ -n "$INITIAL_DETECTED_PORT" && "$SSH_PORT" == "$INITIAL_DETECTED_PORT" ]]; then
|
||||
break; else print_error "Invalid port. Choose a port between 1024-65535."; fi
|
||||
done
|
||||
SERVER_IP_V4=$(curl -4 -s https://ifconfig.me 2>/dev/null || echo "unknown")
|
||||
SERVER_IP_V6=$(curl -6 -s https://ifconfig.me 2>/dev/null || echo "not available")
|
||||
|
||||
Reference in New Issue
Block a user