aboutsummaryrefslogtreecommitdiff
path: root/sysutils/nagios-statd/files/nagiosstatd.sh.in
blob: 0d1b57f3583525b1afe3886c2b393f5c1ecb7cef (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
#!/bin/sh

# PROVIDE: nagiosstatd
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: shutdown
#
#
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf to enable nagiosstatd:
# nagiosstatd_enable (bool): Set to "NO" by default.
#                          Set it to "YES" to enable nagiosstatd 
# nagiosstatd_flags="<set as needed>"

nagiosstatd_enable=${nagiosstatd_enable-"NO"}
nagiosstatd_pidfile=${nagiosstatd_pidfile-"/var/run/nagiosstatd.pid"}

. /etc/rc.subr

name="nagiosstatd"
#rcvar=`set_rcvar`
rcvar=${name}_enable

pidfile="${nagiosstatd_pidfile}"


command=%%PREFIX%%/sbin/nagios-statd
command_args="-P ${nagiosstatd_pidfile}"
command_interpreter="python"

load_rc_config $name

start_precmd="export PATH=\"$PATH:/usr/local/bin\""

run_rc_command "$1"