aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt/nrpe/files/nrpe.sh.in
blob: a3e40661ce9d586f37c7d1f92b3d23e9263db400 (plain) (blame)
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
#!/bin/sh
#
# $FreeBSD$
#

#
# Add the following lines to /etc/rc.conf to enable apache2:
# nrpe_enable (bool):   Set to "NO" by default.
#           Set it to "YES" to enable nrpe
# nrpe_config (string): Set to "/usr/local/etc/nrpe.cfg" by default.
#

. %%RC_SUBR%%

name="nrpe"
rcvar=`set_rcvar`

command="%%PREFIX%%/sbin/nrpe"

[ -z "$nrpe_enable" ]   && nrpe_enable="NO"
[ -z "$nrpe_config" ]   && nrpe_config="%%PREFIX%%/etc/nrpe.cfg"

nrpe_flags="-c ${nrpe_config} --daemon"

load_rc_config $name

run_rc_command "$1"