View | Details | Raw Unified | Return to bug 159304 | Differences between
and this patch

Collapse All | Expand All

(-)nagios.in (-13 / +11 lines)
Lines 1-13 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
#
3
# $FreeBSD: ports/net-mgmt/nagios/files/nagios.in,v 1.4 2010/03/27 00:14:22 dougb Exp $
4
#
5
2
3
# $FreeBSD$
4
#
6
# PROVIDE: nagios
5
# PROVIDE: nagios
7
# REQUIRE: DAEMON
6
# REQUIRE: LOGIN
8
# BEFORE: LOGIN
9
# KEYWORD: shutdown
7
# KEYWORD: shutdown
10
11
#
8
#
12
# Add the following lines to /etc/rc.conf to enable nagios:
9
# Add the following lines to /etc/rc.conf to enable nagios:
13
# nagios_enable (bool):    Set to "NO" by default.
10
# nagios_enable (bool):    Set to "NO" by default.
Lines 16-28 Link Here
16
#                          Set it to "YES" to enable pre-caching.
13
#                          Set it to "YES" to enable pre-caching.
17
# nagios_flags (str):      Set to "" by default.
14
# nagios_flags (str):      Set to "" by default.
18
# nagios_configfile (str): Set to "%%PREFIX%%/etc/nagios/nagios.cfg" by default.
15
# nagios_configfile (str): Set to "%%PREFIX%%/etc/nagios/nagios.cfg" by default.
19
#
16
# nagios_web_user (str):   Set to uid that runs the web server (default www).
20
17
21
. /etc/rc.subr
18
. /etc/rc.subr
22
19
23
name="nagios"
20
name="nagios"
24
rcvar=`set_rcvar`
21
rcvar=`set_rcvar`
25
22
23
load_rc_config "${name}"
24
25
[ -z "${nagios_enable}" ]       && nagios_enable="NO"
26
[ -z "${nagios_configfile}" ]   && nagios_configfile="%%PREFIX%%/etc/nagios/nagios.cfg"
27
[ -z "${nagios_precache}" ]     && nagios_precache="NO"
28
26
command="%%PREFIX%%/bin/nagios"
29
command="%%PREFIX%%/bin/nagios"
27
command_args="-d"
30
command_args="-d"
28
extra_commands="reload"
31
extra_commands="reload"
Lines 30-46 Link Here
30
nagios_user="%%NAGIOSUSER%%"
33
nagios_user="%%NAGIOSUSER%%"
31
34
32
start_precmd="start_precmd"
35
start_precmd="start_precmd"
36
start_postcmd="chown ${nagios_web_user:-www} /var/spool/nagios/rw/nagios.cmd"
33
stop_postcmd="stop_postcmd"
37
stop_postcmd="stop_postcmd"
34
restart_precmd="nagios_checkconfig"
38
restart_precmd="nagios_checkconfig"
35
reload_precmd="reload_precmd"
39
reload_precmd="reload_precmd"
36
sig_reload=HUP
40
sig_reload=HUP
37
41
38
[ -z "${nagios_enable}" ]       && nagios_enable="NO"
39
[ -z "${nagios_configfile}" ]   && nagios_configfile="%%PREFIX%%/etc/nagios/nagios.cfg"
40
[ -z "${nagios_precache}" ]     && nagios_precache="NO"
41
42
load_rc_config "${name}"
43
44
required_files="${nagios_configfile}"
42
required_files="${nagios_configfile}"
45
command_args="${command_args} ${nagios_configfile}"
43
command_args="${command_args} ${nagios_configfile}"
46
44

Return to bug 159304