BACK

Named Startup Script

      This script is off of my SuSE Linux 6.3 server.  You might want to verify the locations of your daemons before you attempt to start the DNS server.  The Blue text is the location for the daemon that starts named.  If you're not using SuSE then you might have to comment out the first few lines if you don't have a rc.config file.


#! /bin/sh
#
# Copyright (c) 1998 Florian La Roche
#

. /etc/rc.config

base=${0##*/}
link=${base#*[SK][0-9][0-9]}

test $link = $base && START_NAMED=yes
test "$START_NAMED" = yes || exit 0

return=$rc_done
case "$1" in
    start)      echo -n "Starting name server."
            startproc /usr/sbin/named || return=$rc_failed
            echo -e "$return"
            ;;
    stop)      echo -n "Shutting down name server"
            killproc -TERM /usr/sbin/named || return=$rc_failed
            echo -e "$return"
            ;;
    restart|reload)
            $0 stop && $0 start || return=$rc_failed
            ;;
    status)      checkproc /usr/sbin/named && echo OK || echo No process
            ;;
    *)            echo "Usage: $0 {start|stop|restart|reload|status}"
            exit 1
esac

test "$return" = "$rc_done" || exit 1
exit 0


BACK