[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Configuring monit to keep application running
From: |
chinaboy |
Subject: |
Configuring monit to keep application running |
Date: |
Mon, 15 Sep 2014 14:52:16 -0700 (MST) |
Hi...
I have just set up Monit on my VPS Server but can't figure out how to
monitor an application that I have running on my VPS. Below is the script in
my /etc/init.d/simplehelp. In my montitrc file the put this these lines, but
doesn't seem to work. Can someone point me the right direction. The path to
my application is /opt/SimpleHelp. I can manually start and stop the
server using the command below, but just can't figure how to get Monit to
monitor and restart service when it stops. Please help.
check process SimpleHelp with path /opt/SimpleHelp
start program = "/etc/init.d/simplehelp start"
stop program = "/etc/init.d/simplehelp stop"
############################
#!/bin/bash
SHELPDIR=/opt/SimpleHelp
case "$1" in
start)
cd $SHELPDIR ; sh ./serverstart.sh
;;
stop)
cd $SHELPDIR ; sh ./serverstop.sh
;;
reload|force-reload)
cd $SHELPDIR ; sh ./serverstop.sh
cd $SHELPDIR ; sh ./serverstart.sh
;;
restart)
cd $SHELPDIR ; sh ./serverstop.sh
cd $SHELPDIR ; sh ./serverstart.sh
;;
esac
--
View this message in context:
http://nongnu.13855.n7.nabble.com/Configuring-monit-to-keep-application-running-tp189859.html
Sent from the monit-general mailing list archive at Nabble.com.
- Configuring monit to keep application running,
chinaboy <=