Ticket #1627: named.init

File named.init, 515 bytes (added by vasquez, 11 years ago)

new start script

Line 
1#!/bin/sh /etc/rc.common
2
3config_file=/etc/bind/named.conf
4pid_file=/var/run/named.pid
5
6start() {
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
17stop() {
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}