#!/bin/sh
# description: Domain name server daemon

# Include the functions declared in the /etc/rc.d/functions file
source /etc/rc.d/functions

# path to binary
ROOT="/usr/sbin"
# name of binary to run
APP="named"
#runtime options
OPT=""
#server name & description
SERVER="BIND Domain name server"

case "$1" in
        start)
                echo -n "Starting $SERVER............"
                loadproc $ROOT/$APP $OPT
                ;;

        stop)
                echo -n "Stopping $SERVER............"
                killproc $ROOT/$APP
                ;;

        restart)
                $0 stop
                /bin/sleep 1
                $0 start
                ;;
        status)
                statusproc $ROOT/$APP
                ;;

        *)
                echo "Usage: $0 {start|stop|restart|status}"
                exit 1
        ;;

esac

# End /etc/init.d/
