diff --git a/post-install_Claude.sh b/post-install_Claude.sh index 9c322c7..2d7830d 100644 --- a/post-install_Claude.sh +++ b/post-install_Claude.sh @@ -44,8 +44,9 @@ EOF check_prerequisites() { [[ $EUID -eq 0 ]] || die "Ce script doit être exécuté en root (sudo)." [[ -r /etc/debian_version ]] || die "Ce script est prévu pour Debian." - [[ $SSH_PORT =~ ^[0-9]+$ ]] && (( SSH_PORT >= 1 && SSH_PORT <= 65535 )) \ - || die "Port SSH invalide : ${SSH_PORT}" + if ! [[ $SSH_PORT =~ ^[0-9]+$ ]] || (( SSH_PORT < 1 || SSH_PORT > 65535 )); then + die "Port SSH invalide : ${SSH_PORT}" + fi } # --- Étapes ---