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