diff --git a/usr/lib/ffdns/dns-functions.sh b/usr/lib/ffdns/dns-functions.sh index f548d7c..f8cc7b0 100644 --- a/usr/lib/ffdns/dns-functions.sh +++ b/usr/lib/ffdns/dns-functions.sh @@ -282,10 +282,9 @@ ReloadZone() { elif [ $((DNSSCRIPT_BIND_RELOAD_VER)) -eq 1 ]; then for Zone in $2; do rndc reload "$1" IN "$Zone" 2>"/tmp/dnsscript_rndcerr" >/dev/null || \ - touch "/tmp/dnsscript-forcereconf" - if [ -n "$3" ] && grep -q "failed: out of range" "/tmp/dnsscript_rndcerr"; then - rm -f "$3""db.""$Zone"".""$1".* - fi + [ -n "$3" ] && grep -q "failed: out of range" "/tmp/dnsscript_rndcerr" && \ + rndc sync -clean "$1" IN "$Zone" >/dev/null || \ + touch "/tmp/dnsscript-forcereconf" rm -f "/tmp/dnsscript_rndcerr" done elif [ $((DNSSCRIPT_BIND_RELOAD_VER)) -eq 2 ]; then