unbound 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #!/bin/sh
  2. ########################################################################
  3. # Begin unbound
  4. #
  5. # Description : Unbound DNS resolver boot script
  6. #
  7. # Author : Igor Živković <contact@igor-zivkovic.from.hr>
  8. #
  9. # Version : BLFS SVN
  10. #
  11. ########################################################################
  12. ### BEGIN INIT INFO
  13. # Provides: unbound
  14. # Required-Start: $network $remote_fs $syslog
  15. # Required-Stop: $network $remote_fs $syslog
  16. # Default-Start: 2 3 4 5
  17. # Default-Stop: 0 1 6
  18. # Short-Description: Starts Unbound DNS resolver
  19. # X-LFS-Provided-By: BLFS
  20. ### END INIT INFO
  21. . /etc/rc.d/functions
  22. #$LastChangedBy: igor $
  23. #$Date: 2013-07-21 18:16:47 -0500 (Sun, 21 Jul 2013) $
  24. case "$1" in
  25. start)
  26. log_info_msg "Starting Unbound DNS resolver..."
  27. unbound-anchor
  28. start_daemon /usr/sbin/unbound
  29. evaluate_retval
  30. ;;
  31. stop)
  32. log_info_msg "Stopping Unbound DNS resolver..."
  33. killproc -p "/run/unbound.pid" /usr/sbin/unbound
  34. evaluate_retval
  35. ;;
  36. restart)
  37. $0 stop
  38. sleep 1
  39. $0 start
  40. ;;
  41. status)
  42. statusproc /usr/sbin/unbound
  43. ;;
  44. *)
  45. echo "Usage: $0 {start|stop|restart|status}"
  46. exit 1
  47. ;;
  48. esac
  49. # End unbound