diff --git a/README.md b/README.md index 2953a8a..3bc4a5b 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ **Version:** v0.70 -**Last Updated:** 2025-10-14 +**Last Updated:** 2025-10-18 **Compatible With:** diff --git a/du_setup.sh b/du_setup.sh index 210b569..ed1740c 100644 --- a/du_setup.sh +++ b/du_setup.sh @@ -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")