fix: permissions; unnecessary key reload when serving extern and root; reloading with rndc
Signed-off-by: Blackyfff <freifunk@freifunk-herpf.de>master
parent
9ba6d7d631
commit
070fefabf5
|
@ -49,7 +49,8 @@ zone \"""$1""\" {\n\
|
|||
}
|
||||
GetAllNameservers() {
|
||||
sed -ne 's/^\s*'"$2"'\s\+\([0-9]*\s\)\?\s*[Ii][Nn]\s\+[Nn][Ss]\s\+\(\S\+\)/\3/p' "$3" | \
|
||||
sed -e 's/\([^.]\)$/\1\.'"$1"'\./g;s/\.$//g'
|
||||
sed -e 's/\([^.]\)$/\1\.'"$1"'\./g;s/\.$//g' | \
|
||||
awk '!a[$0]++'
|
||||
}
|
||||
GetAllSubNameservers() {
|
||||
Domain="$(SEDifyHostname "$1")"
|
||||
|
@ -281,10 +282,13 @@ ReloadZone() {
|
|||
systemctl reload bind9 >/dev/null
|
||||
elif [ $((DNSSCRIPT_BIND_RELOAD_VER)) -eq 1 ]; then
|
||||
for Zone in $2; do
|
||||
rndc reload "$1" IN "$Zone" 2>"/tmp/dnsscript_rndcerr" >/dev/null || \
|
||||
[ -n "$3" ] && grep -q "failed: out of range" "/tmp/dnsscript_rndcerr" && \
|
||||
rndc sync -clean "$1" IN "$Zone" >/dev/null || \
|
||||
touch "/tmp/dnsscript-forcereconf"
|
||||
if ! rndc reload "$1" IN "$Zone" 2>"/tmp/dnsscript_rndcerr" >/dev/null; then
|
||||
if [ -n "$3" ] && grep -q "failed: out of range" "/tmp/dnsscript_rndcerr"; then
|
||||
rndc sync -clean "$1" IN "$Zone" >/dev/null || touch "/tmp/dnsscript-forcereconf"
|
||||
else
|
||||
touch "/tmp/dnsscript-forcereconf"
|
||||
fi
|
||||
fi
|
||||
rm -f "/tmp/dnsscript_rndcerr"
|
||||
done
|
||||
elif [ $((DNSSCRIPT_BIND_RELOAD_VER)) -eq 2 ]; then
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
# exit script when command fails
|
||||
set -e
|
||||
|
||||
export DNSSCRIPT_VERSION="0.8.2"
|
||||
export DNSSCRIPT_VERSION="0.8.3"
|
||||
|
||||
. /etc/ffdns/community.conf
|
||||
. /etc/ffdns/local.conf
|
||||
|
|
Loading…
Reference in New Issue