13 lines
No EOL
262 B
Bash
13 lines
No EOL
262 B
Bash
#!/bin/sh
|
|
set -e
|
|
|
|
# Set permissions
|
|
chown -R named:named /etc/bind /var/log/named /var/cache/bind
|
|
|
|
# Generate rndc.key if missing
|
|
if [ ! -f /etc/bind/rndc.key ]; then
|
|
rndc-confgen -a -c /etc/bind/rndc.key -k rndc-key -A hmac-sha256
|
|
fi
|
|
|
|
# Start BIND
|
|
exec "$@" |