blob: 2c652c992ff917ac33a4363624149dc108739823 (
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
|
#!/bin/sh
# PROVIDE: nsca
# REQUIRE: nagios
# BEFORE: LOGIN
# KEYWORD: shutdown
#
# 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 "--daemon" by default.
# nsca_configfile (str): Set to "%%PREFIX%%/etc/nagios/nsca.cfg" by default.
#
. /etc/rc.subr
name="nsca"
rcvar=nsca_enable
command="%%PREFIX%%/sbin/nsca"
pidfile="/var/run/nsca.pid"
extra_commands=reload
nsca_enable=${nsca_enable:-"NO"}
nsca_flags=${nsca_flags:-"--daemon"}
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"
|