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 -n "Initializing $NAME control key: rndc-confgen"
23 touch $CHROOT/etc
/rndc.key
# handle symlinks
24 rndc-confgen
-a -r /dev
/urandom
$ARGS ||
echo "."
27 test -z "$CONF" || ARGS
="$ARGS -c $CONF"
28 echo -n "Starting domain name daemon: $NAME"
30 start-stop-daemon
-S -x $DAEMON -- $ARGS
35 echo -n "Stopping domain name daemon: $NAME"
36 rndc stop || start-stop-daemon
-K -x $DAEMON
45 rndc reload
&& exit $?
48 echo "Usage: $0 {start|stop|restart|reload|force-reload}"