]> git.pld-linux.org Git - packages/bind.git/blob - named.init
- patches and other stuff for bind
[packages/bind.git] / named.init
1 #!/bin/bash
2 #
3 # named           This shell script takes care of starting and stopping
4 #                 named (BIND DNS server).
5 #
6 # chkconfig: 345 55 45
7 # description: named (BIND) is a Domain Name Server (DNS) \
8 # that is used to resolve host names to IP addresses.
9
10 # Source function library.
11 . /etc/rc.d/init.d/functions
12
13 # Source networking configuration.
14 . /etc/sysconfig/network
15
16 # Check that networking is up.
17 [ "${NETWORKING}" = "no" ] && exit 0
18
19 [ -f /usr/sbin/named ] || exit 0
20
21 [ -f /etc/named.conf ] || exit 0
22
23 [ -f /etc/sysconfig/named ] && . /etc/sysconfig/named
24         
25 # See how we were called.
26 case "$1" in
27   start)
28         show Starting named
29         daemon $NICELEVEL named
30         touch /var/lock/subsys/named
31         ;;
32   stop)
33         show Stopping named
34         killproc named
35         rm -f /var/lock/subsys/named
36         ;;
37   status)
38         status named
39         ;;
40   restart)
41         $0 stop
42         $0 start
43         ;;
44   *)
45         echo "Usage: $0 {start|stop|status|restart}"
46         exit 1
47 esac
48
49 exit 0
This page took 0.462604 seconds and 4 git commands to generate.