summaryrefslogtreecommitdiffstats
path: root/startup/openrc-init.in
blob: c123c95b005801d8342c79d23711ece6bd7c1b7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/sbin/openrc-run
#
# Copyright (c) 2017 Nagios(R) Core(TM) Development Team
#

# Supply a default value for NRPE_CFG in case the corresponding
# conf.d file is not installed.
: ${NRPE_CFG:="@sysconfdir@/nrpe.cfg"}

command="@sbindir@/nrpe"
command_args="--config=${NRPE_CFG} ${NRPE_OPTS}"
command_args_background="--daemon"
description="Nagios Remote Plugin Executor (NRPE) daemon"
extra_started_commands="reload"
pidfile="@piddir@/${RC_SVCNAME}.pid"

reload() {
    ebegin "Reloading ${RC_SVCNAME}"
    start-stop-daemon --signal HUP --pidfile "${pidfile}"
    eend $?
}