blob: aa4ed45f08387dee4cbbb7690c46d1cea2e43088 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#!/bin/sh
#
# Copyright (c) 2016 Nagios(R) Core(TM) Development Team
#
# PROVIDE: nrpe
# REQUIRE: DAEMON
# KEYWORD: shutdown
. /etc/rc.subr
: ${nrpe@bsd_enable@:="NO"}
: ${nrpe_configfile:="@pkgsysconfdir@/nrpe.cfg"}
name=nrpe
command="@sbindir@/nrpe"
command_args="-c $nrpe_configfile -d"
pidfile="@piddir@/nrpe.pid"
extra_commands=reload
sig_reload=HUP
rcvar=nrpe@bsd_enable@
load_rc_config "$name"
required_files="$nrpe_configfile"
sig_reload=HUP
start_precmd=nrpe_prestart
nrpe_prestart()
{
[ -n "$nrpe_pidfile" ] &&
warn "No longer necessary to set nrpe_pidfile in rc.conf[.local]"
install -d -o @nrpe_user@ ${pidfile%/*}
}
run_rc_command "$1"
|