3 # System-V init to control the bind DNS Daemon
9 # this file contains a few tunable parameters
10 test -r /etc
/default
/named
&& .
/etc
/default
/named
12 test -f $DAEMON ||
exit 0
18 test -z "$CHROOT" || ARGS
="$ARGS -t $CHROOT"
19 test -z "$SETUID" || ARGS
="$ARGS -u $SETUID"
20 if [ ! -f $CHROOT/etc
/rndc.key
]; then
21 echo "Initializing $NAME control key: rndc-confgen"
24 # if rndc.key is a symlink, the target must exist
25 touch $CHROOT/etc
/rndc.key
28 rndc-confgen
-a -r /dev
/urandom
$ARGS || true
31 test -z "$CONF" || ARGS
="$ARGS -c $CONF"
32 echo -n "Starting domain name daemon: $NAME"
34 start-stop-daemon
-S -x $DAEMON -- $ARGS
39 echo -n "Stopping domain name daemon: $NAME"
40 rndc stop || start-stop-daemon
-K -x $DAEMON
49 rndc reload ||
$0 restart
52 echo "Usage: $0 {start|stop|restart|reload|force-reload}"