Lines 12-17
Link Here
|
12 |
# Add the following lines to /etc/rc.conf to enable monit: |
12 |
# Add the following lines to /etc/rc.conf to enable monit: |
13 |
# monit_enable (bool): Set to "NO" by default. |
13 |
# monit_enable (bool): Set to "NO" by default. |
14 |
# Set it to "YES" to enable monit |
14 |
# Set it to "YES" to enable monit |
|
|
15 |
# monit_flags (str): Flags passed to monit on startup. |
16 |
# Default is "". |
15 |
# |
17 |
# |
16 |
. %%RC_SUBR%% |
18 |
. %%RC_SUBR%% |
17 |
|
19 |
|
Lines 21-36
Link Here
|
21 |
restart_precmd="monit_checkconfig" |
23 |
restart_precmd="monit_checkconfig" |
22 |
reload_precmd="monit_checkconfig" |
24 |
reload_precmd="monit_checkconfig" |
23 |
|
25 |
|
|
|
26 |
[ -z "$monit_enable" ] && monit_enable="NO" |
27 |
[ -z "$monit_flags" ] && monit_flags="" |
28 |
|
29 |
load_rc_config $name |
30 |
|
24 |
default_config=%%PREFIX%%/etc/monitrc |
31 |
default_config=%%PREFIX%%/etc/monitrc |
25 |
required_files=${default_config} |
32 |
required_files=${default_config} |
26 |
command="%%PREFIX%%/bin/monit" |
33 |
command="%%PREFIX%%/bin/monit" |
27 |
command_args="-c ${default_config}" |
34 |
command_args="-c ${default_config}" |
28 |
pidfile="/var/run/monit.pid" |
35 |
pidfile="/var/run/monit.pid" |
29 |
|
36 |
|
30 |
[ -z "$monit_enable" ] && monit_enable="NO" |
|
|
31 |
|
32 |
load_rc_config $name |
33 |
|
34 |
monit_checkconfig() |
37 |
monit_checkconfig() |
35 |
{ |
38 |
{ |
36 |
echo "Performing sanity check on monit configuration:" |
39 |
echo "Performing sanity check on monit configuration:" |