459e0834aebaeb68e7233fbae2f1be9fcace4fd9
[openwrt/svn-archive/archive.git] / net / bind / files / named.init
1 #!/bin/sh /etc/rc.common
2
3 config_file=/etc/bind/named.conf
4 pid_file=/var/run/named.pid
5
6 start() {
7 echo Starting isc-bind
8
9 /usr/sbin/named -c $config_file
10
11 if [ $$ -eq 0 ]
12 then
13 echo " isc-bind failed to start"
14 fi
15 }
16
17 stop() {
18 echo "Stopping isc-bind"
19 if [ -e $pid_file ]
20 then
21 kill `cat $pid_file`
22
23 if [ $$ -eq 0 ]
24 then
25 echo " PID " `cat $pid_file` not found
26 echo " Is the named server running?"
27 fi
28
29 rm $pid_file
30
31 else
32 echo " $pid_file not found"
33 fi
34 }