Merge pull request 'dns healthcheck' (#9) from refactor into main
Some checks failed
Deploy DNS Configuration / deploy (push) Failing after 13m9s

Reviewed-on: #9
This commit is contained in:
goodvin 2026-03-21 11:18:02 +03:00
commit de16de309c

View file

@ -120,13 +120,23 @@ dns_health_check() {
fi
}
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"
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"
rollback
exit 1
fi
echo "DNS health check passed"
# ==============================
# Очистка IPSET