openrc-init.in 574 B

123456789101112131415161718192021
  1. #!/sbin/openrc-run
  2. #
  3. # Copyright (c) 2017 Nagios(R) Core(TM) Development Team
  4. #
  5. # Supply a default value for NRPE_CFG in case the corresponding
  6. # conf.d file is not installed.
  7. : ${NRPE_CFG:="@sysconfdir@/nrpe.cfg"}
  8. command="@sbindir@/nrpe"
  9. command_args="--config=${NRPE_CFG} ${NRPE_OPTS}"
  10. command_args_background="--daemon"
  11. description="Nagios Remote Plugin Executor (NRPE) daemon"
  12. extra_started_commands="reload"
  13. pidfile="@piddir@/${RC_SVCNAME}.pid"
  14. reload() {
  15. ebegin "Reloading ${RC_SVCNAME}"
  16. start-stop-daemon --signal HUP --pidfile "${pidfile}"
  17. eend $?
  18. }