init-script.freebsd.in 426 B

12345678910111213141516171819202122232425262728
  1. #!/bin/sh
  2. # Start/stop the nrpe daemon.
  3. #
  4. # Contributed by Andrew Ryder 06-22-02
  5. # Slight mods by Ethan Galstad 07-09-02
  6. NrpeBin=@bindir@/nrpe
  7. NrpeCfg=@sysconfdir@/nrpe.cfg
  8. case "$1" in
  9. start)
  10. $NrpeBin -c $NrpeCfg -d
  11. echo -n ' nrpe'
  12. ;;
  13. stop)
  14. killall -TERM nrpe
  15. echo -n ' nrpe'
  16. ;;
  17. restart)
  18. killall -HUP nrpe
  19. echo 'nrpe restarted'
  20. ;;
  21. *)
  22. echo "Usage: ${0##*/}: { start | stop | restart }" 2>&1
  23. exit 65
  24. ;;
  25. esac