No Description

named.init 642B

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