3 CONFIG=/etc/bind/named.conf
6 [ -x $DAEMON ] || exit 0
7 [ -f $CONFIG ] || exit 0
11 if [ ! -f /etc/rndc.key ]; then
12 echo -n "Initializing bind control key: "
13 # if rndc.key is a symlink, the target must exist
15 rndc-confgen -a -r /dev/urandom 2>/dev/null && echo "OK" || echo "FAIL"
17 echo -n "Starting domain name daemon: "
18 start-stop-daemon -S -x $DAEMON -- -c $CONFIG -u named
19 [ $? = 0 ] && echo "OK" || echo "FAIL"
22 echo -n "Stopping domain name daemon: "
23 rndc stop || start-stop-daemon -K -x $DAEMON
24 [ $? = 0 ] && echo "OK" || echo "FAIL"
32 rndc reload || $0 restart
35 echo "Usage: $0 {start|stop|restart|reload|force-reload}"