support for first run
This commit is contained in:
parent
fecc46aecd
commit
462f37dfeb
|
@ -155,7 +155,7 @@ ReloadZone() {
|
|||
for Zone in $2; do
|
||||
rndc reload "$1" IN "$Zone"
|
||||
done
|
||||
else
|
||||
elif [ $((DNSSCRIPT_BIND_RELOAD_VER)) -eq 2 ]; then
|
||||
/etc/init.d/named reload
|
||||
fi
|
||||
}
|
||||
|
|
|
@ -16,10 +16,13 @@ UpdateScriptsFolder="/usr/lib/ffdns/"
|
|||
ZoneFilesFolder="/etc/bind/fff/"
|
||||
BindIncludeFileFolder="/etc/bind/"
|
||||
|
||||
# 0 -> Debian (and like) systemctl reload bind9
|
||||
# 1 -> use rndc to reload zone (recommended; rndc needs setup first)
|
||||
# 2 -> OpenWRT /etc/init.d/named reload
|
||||
#
|
||||
# -1 -> disable bind restarting/reloading
|
||||
# 0 -> Debian (and like) systemctl [reload|restart] bind9
|
||||
# 1 -> use rndc to [reload zone|restart] (recommended; rndc needs setup first)
|
||||
# 2 -> OpenWRT /etc/init.d/named [reload|restart]
|
||||
#
|
||||
# Set -1 for first run to prevent exiting on error and let the script generate the config and zonefiles
|
||||
# after first run edit your config and set appropriate value
|
||||
export DNSSCRIPT_BIND_RELOAD_VER=0
|
||||
|
||||
# only necessary when rndc is used
|
||||
|
@ -128,7 +131,7 @@ if [ $ReConfigBind -eq 0 ]; then
|
|||
systemctl restart bind9
|
||||
elif [ $((DNSSCRIPT_BIND_RELOAD_VER)) -eq 1 ]; then
|
||||
rndc reconfig
|
||||
else
|
||||
elif [ $((DNSSCRIPT_BIND_RELOAD_VER)) -eq 2 ]; then
|
||||
/etc/init.d/named restart
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue