[UPDATE] - init.d
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
# Provides: monithor-c
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop:
|
||||
# Short-Description: MoniThor Server
|
||||
# Short-Description: MoniThor client
|
||||
### END INIT INFO
|
||||
|
||||
set -e
|
||||
@@ -21,15 +21,20 @@ case "$1" in
|
||||
logger "monithor-client is running ..."
|
||||
exit
|
||||
else
|
||||
logger "Starting MoniThor Server"
|
||||
logger "Starting MoniThor client "
|
||||
/usr/local/bin/monithor-client start
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
logger "Stoping MoniThor server" "monithor-c" || true
|
||||
logger "Stoping MoniThor client " "monithor-c" || true
|
||||
/usr/local/bin/monithor-client stop
|
||||
;;
|
||||
|
||||
status)
|
||||
logger "status MoniThor client " "monithor-c" || true
|
||||
[ $(ps axf| grep MoniThor | grep SCREEN | wc -l) -gt 1 ] && echo "monithor-c is running" || echo "montihor-c is dead"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: /etc/init.d/monithor-c {start|stop|status}" || true
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user