You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
642 B

  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. }