start.sh: exit when any of the background processes quit
This will terminate the docker container when any of the processes (pdns_server or inotifywait) fails.
This commit is contained in:
parent
21b4e29176
commit
dd8e3dcdd8
8
start.sh
8
start.sh
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
/usr/sbin/pdns_server --guardian=no --daemon=no --disable-syslog --log-timestamp=no --write-pid=no &
|
||||
|
||||
@ -8,4 +8,8 @@ inotifywait -mqre modify --exclude '\.git' --format '%w%f' "/var/lib/powerdns/zo
|
||||
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
|
||||
done &
|
||||
|
||||
wait -n
|
||||
|
||||
exit $?
|
||||
|
Loading…
Reference in New Issue
Block a user