diff options
Diffstat (limited to 'system/monit/rc.monit')
-rw-r--r-- | system/monit/rc.monit | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/system/monit/rc.monit b/system/monit/rc.monit index f1bd5107f823e..b68e373eac2a6 100644 --- a/system/monit/rc.monit +++ b/system/monit/rc.monit @@ -7,8 +7,7 @@ # ### Default variables -CONFIG="/etc/monit.conf" -PIDFILE="/var/run/monit.pid" +CONFIG="/etc/monitrc" [ -x /usr/bin/monit ] || exit 1 [ -r "$CONFIG" ] || exit 1 @@ -19,17 +18,13 @@ desc="Process Monitor" start() { echo "Starting $desc ($prog): /etc/rc.d/rc.$prog start" - $prog -c $CONFIG -p $PIDFILE + $prog -c $CONFIG return $? } stop() { echo "Shutting down $desc ($prog)..." - if [ -f $PIDFILE ]; then - kill -TERM $(cat $PIDFILE) - else - killall -TERM $prog - fi + monit quit return $? } @@ -45,12 +40,7 @@ reload() { } status() { - PIDS=$(pidof $prog) - if [ "$PIDS" == "" ]; then - echo "$prog is not running!" - else - echo "$prog is running at pid(s) ${PIDS}." - fi + monit status return $? } |