bind 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #!/bin/sh
  2. ########################################################################
  3. # Begin bind
  4. #
  5. # Description : Start Berkeley Internet Name Daemon
  6. #
  7. # Author : DJ Lucas - dj@linuxfromscratch.org
  8. # Bruce Dubbs - bdubbs@linuxfromscratch.org
  9. #
  10. # Version : LFS 7.0
  11. #
  12. ########################################################################
  13. ### BEGIN INIT INFO
  14. # Provides: bind
  15. # Required-Start: $time $network
  16. # Should-Start:
  17. # Required-Stop: $network
  18. # Should-Stop: $remote_fs
  19. # Default-Start: 3 4 5
  20. # Default-Stop: 0 1 2 6
  21. # Short-Description: DNS Daemon
  22. # Description: Provides a local DNS daemon in a chroot environment
  23. # X-LFS-Provided-By: BLFS / LFS 7.0
  24. ### END INIT INFO
  25. . /lib/lsb/init-functions
  26. #$LastChangedBy: randy $
  27. #$Date: 2013-02-12 10:13:34 -0600 (Tue, 12 Feb 2013) $
  28. case "$1" in
  29. start)
  30. log_info_msg "Starting named..."
  31. start_daemon /usr/sbin/named -u named -t /srv/named -c /etc/named.conf
  32. evaluate_retval
  33. ;;
  34. stop)
  35. log_info_msg "Stopping named..."
  36. killproc /usr/sbin/named
  37. evaluate_retval
  38. ;;
  39. restart)
  40. $0 stop
  41. sleep 1
  42. $0 start
  43. ;;
  44. reload)
  45. log_info_msg "Reloading named..."
  46. /usr/sbin/rndc -c /etc/rndc.conf reload
  47. evaluate_retval
  48. ;;
  49. status)
  50. statusproc /usr/sbin/named
  51. ;;
  52. *)
  53. echo "Usage: $0 {start|stop|restart|status}"
  54. exit 1
  55. ;;
  56. esac
  57. # End /etc/init.d/bind