detect zone updates + execute bind-reload-now
This commit is contained in:
parent
bc4110a8bb
commit
4061c8679e
@ -7,6 +7,7 @@ RUN set -eux; \
|
|||||||
pdns-backend-bind \
|
pdns-backend-bind \
|
||||||
sqlite3 \
|
sqlite3 \
|
||||||
bind9-dnsutils \
|
bind9-dnsutils \
|
||||||
|
inotify-tools \
|
||||||
; \
|
; \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
10
start.sh
10
start.sh
@ -1,3 +1,11 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
exec /usr/sbin/pdns_server --guardian=no --daemon=no --disable-syslog --log-timestamp=no --write-pid=no
|
/usr/sbin/pdns_server --guardian=no --daemon=no --disable-syslog --log-timestamp=no --write-pid=no &
|
||||||
|
|
||||||
|
inotifywait -mqre modify --exclude '\.git' --format '%w%f' "/var/lib/powerdns/zones/" |
|
||||||
|
while read -r path; do
|
||||||
|
zone=$(basename $path)
|
||||||
|
echo [$0] A modification was detected in $path
|
||||||
|
echo [$0] Executing \`/usr/bin/pdns_control bind-reload-now $zone\`
|
||||||
|
/usr/bin/pdns_control bind-reload-now $zone
|
||||||
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user