[UPDATE] - refact deb + generate
This commit is contained in:
Executable
+37
@@ -0,0 +1,37 @@
|
||||
#! /bin/sh
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: monithor-c
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop:
|
||||
# Short-Description: MoniThor Server
|
||||
### END INIT INFO
|
||||
|
||||
set -e
|
||||
|
||||
test -x /usr/local/bin/monithor-client || exit 0
|
||||
|
||||
umask 022
|
||||
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
if [ ! -z $(ps axf| grep monithor-client | grep -v grep) ]
|
||||
then
|
||||
logger "monithor-client is running ..."
|
||||
else
|
||||
logger "Starting MoniThor Server"
|
||||
/usr/local/bin/monithor-client start
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
logger "Stoping MoniThor server" "monithor-c" || true
|
||||
/usr/local/bin/monithor-client stop
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: /etc/init.d/monithor-c {start|stop|status}" || true
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user