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

# $FreeBSD$
#
# 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>"

. /etc/rc.subr

name="nagiosstatd"
rcvar=nagiosstatd_enable

load_rc_config $name

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

pidfile="${nagiosstatd_pidfile}"

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

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

run_rc_command "$1"