blob: acca5bf89b8bff14422b6fafe28fc353c6b19bde (
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: nrpe2
# REQUIRE: NETWORKING
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable nrpe2:
# nrpe2_enable (bool): Set to "NO" by default.
# Set it to "YES" to enable nrpe2.
# nrpe2_flags (str): Set to "" by default.
# nrpe2_configfile (str): Set to "%%PREFIX%%/etc/nrpe.cfg" by default.
# nrpe2_pidfile (str): Set to "%%NAGIOSDIR%%/nrpe2.pid" by default.
#
. /etc/rc.subr
name="nrpe2"
rcvar=`set_rcvar`
command="%%PREFIX%%/sbin/nrpe2"
command_args="-d"
extra_commands="reload"
sig_reload=HUP
[ -z "${nrpe2_enable}" ] && nrpe2_enable="NO"
[ -z "${nrpe2_configfile}" ] && nrpe2_configfile="%%PREFIX%%/etc/nrpe.cfg"
[ -z "${nrpe2_pidfile}" ] && nrpe2_pidfile="%%NAGIOSDIR%%/nrpe2.pid"
load_rc_config "${name}"
pidfile="${nrpe2_pidfile}"
required_files="${nrpe2_configfile}"
command_args="${command_args} -c ${nrpe2_configfile}"
run_rc_command "$1"
|