From 4e166d517d9722f7dd92d23210987c7117bde9b3 Mon Sep 17 00:00:00 2001 From: Wen Heping Date: Tue, 16 Mar 2010 02:09:44 +0000 Subject: - Improve rc script PR: ports/144772 Submitted by: Martin Pala (maintainer) --- sysutils/monit/files/monit.sh.in | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'sysutils/monit') diff --git a/sysutils/monit/files/monit.sh.in b/sysutils/monit/files/monit.sh.in index a380cc9bbb92..f007c3009832 100644 --- a/sysutils/monit/files/monit.sh.in +++ b/sysutils/monit/files/monit.sh.in @@ -12,6 +12,8 @@ # Add the following lines to /etc/rc.conf to enable monit: # monit_enable (bool): Set to "NO" by default. # Set it to "YES" to enable monit +# monit_flags (str): Flags passed to monit on startup. +# Default is "". # . %%RC_SUBR%% @@ -20,6 +22,10 @@ rcvar=`set_rcvar` restart_precmd="monit_checkconfig" reload_precmd="monit_checkconfig" +[ -z "monit_enable" ] && monit_enable="NO" +[ -z "$monit_flags" ] && monit_flags="" + +load_rc_config $name default_config=%%PREFIX%%/etc/monitrc required_files=${default_config} @@ -27,10 +33,6 @@ command="%%PREFIX%%/bin/monit" command_args="-c ${default_config}" pidfile="/var/run/monit.pid" -[ -z "$monit_enable" ] && monit_enable="NO" - -load_rc_config $name - monit_checkconfig() { echo "Performing sanity check on monit configuration:" -- cgit v1.2.3