summaryrefslogtreecommitdiff
path: root/system/monit/rc.monit
diff options
context:
space:
mode:
authorBryan Harris <bryanlharris@gmail.com>2016-08-06 06:29:43 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2016-08-07 18:55:32 +0700
commit50ee162f272cbf5566d445d38338cbe24e82470a (patch)
treebbb3457611c9d2f24e4a09a74b413f08268e1f0a /system/monit/rc.monit
parent3aba221371667fe0de7defd06a99edc90188e65e (diff)
downloadslackbuilds-50ee162f272cbf5566d445d38338cbe24e82470a.tar.gz
system/monit: Update script + New Maintainer.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/monit/rc.monit')
-rw-r--r--system/monit/rc.monit18
1 files changed, 4 insertions, 14 deletions
diff --git a/system/monit/rc.monit b/system/monit/rc.monit
index f1bd5107f8..b68e373eac 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 $?
}