diff --git a/scripts/deploy-to-gateway.sh b/scripts/deploy-to-gateway.sh index 257df44..3205164 100644 --- a/scripts/deploy-to-gateway.sh +++ b/scripts/deploy-to-gateway.sh @@ -120,23 +120,13 @@ dns_health_check() { fi } -echo "Running DNS health check ($DNS_CHECK_DOMAIN via $DNS_LISTEN_ADDR, up to 15 attempts)..." -dns_ok=false -for i in $(seq 1 15); do - if dns_health_check; then - dns_ok=true - echo "DNS health check passed (attempt $i)" - break - fi - echo " attempt $i failed, retrying in 1s..." - sleep 1 -done - -if ! $dns_ok; then - echo "Error: DNS health check failed after 15 attempts — Pi-hole not responding on $DNS_LISTEN_ADDR" +echo "Running DNS health check ($DNS_CHECK_DOMAIN via $DNS_LISTEN_ADDR)..." +if ! dns_health_check; then + echo "Error: DNS health check failed — Pi-hole not responding on $DNS_LISTEN_ADDR" rollback exit 1 fi +echo "DNS health check passed" # ============================== # Очистка IPSET