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.
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general