3 # named This shell script takes care of starting and stopping
4 # named (BIND DNS server).
8 # description: named (BIND) is a Domain Name Server (DNS) \
9 # that is used to resolve host names to IP addresses.
11 # Source function library
12 . /etc/rc.d/init.d/functions
14 # Source networking configuration
15 . /etc/sysconfig/network
18 [ -f /etc/sysconfig/named ] && . /etc/sysconfig/named
20 # Check that networking is up.
21 if is_no "${NETWORKING}"; then
22 msg_Network_Down "Named"
27 [ -e /etc/named.conf ] || exit 0
29 # See how we were called.
32 # Check if the service is already running?
33 if [ ! -f /var/lock/subsys/named ]; then
35 touch /var/lib/named/named.log && \
36 chown named.named /var/lib/named/named.log
37 daemon named -u named -t /var/lib/named -c /etc/named.conf </dev/null
39 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/named
41 msg_Already_Running "Named"
46 if [ -f /var/lock/subsys/named ]; then
49 rm -f /var/lock/subsys/named >/dev/null 2>&1
51 msg_Not_Running "Named"
56 # "status" Not implemented yet
57 # /usr/sbin/rndc status
62 if [ -f /var/lock/subsys/named ]; then
66 msg_Not_Running "Named"
76 msg_Usage "$0 {start|stop|status|reload|restart}"