blob: bd78ef1f9b82692bf955b57d343d43049851adc3 (
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
|
#!/bin/sh
#
# Add the following lines to /etc/rc.conf to enable nsca:
# nsca_enable (bool): Set to "NO" by default.
# Set it to "YES" to enable nsca.
# nsca_flags (str): Set to "--single" by default.
# nsca_configfile (str): Set to "%%PREFIX%%/etc/nagios/nsca.cfg" by default.
#
. %%RC_SUBR%%
name="nsca"
rcvar=`set_rcvar`
command="%%PREFIX%%/sbin/nsca"
pidfile="/var/run/nsca.pid"
extra_commands=reload
nsca_enable=${nsca_enable:-"NO"}
nsca_flags=${nsca_flags:-"--single"}
nsca_configfile=${nsca_configfile:-"%%PREFIX%%/etc/nagios/nsca.cfg"}
load_rc_config "${name}"
required_files="${nsca_configfile}"
command_args="-c ${nsca_configfile}"
run_rc_command "$1"
|