1
0
Fork 0
mirror of https://github.com/Luzifer/dns.git synced 2024-12-22 19:01:20 +00:00
dns/docker-entrypoint.sh
Knut Ahlers 38f960df77
Move to bind instead of coredns
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2019-01-12 17:09:45 +01:00

20 lines
350 B
Bash
Executable file

#!/usr/local/bin/dumb-init /bin/bash
set -euxo pipefail
# Ensure default config without zones
[ -e /src/zones/named.conf ] || {
cp /src/named.conf.default /src/zones/named.conf
}
if [ "${1:-}" = 'named' ]; then
# Generate rndc communication key
rndc-confgen -a
# Start crond in the background
crond
# Start coredns
exec "$@"
fi
exec "$@"