Thank you so much. So this is what I have now in by bash and monitrc file. 
But the STATUS in Monit says "Execution Failed". Am I missing something?

#!/bin/bash 

SHELPDIR=/opt/SimpleHelp

case "$1" in
  start)
     echo $$ > /opt/SimpleHelp/simplehelp.pid; 
     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


##############

check process SimpleHelp with path /opt/SimpleHelp
     start program = "/etc/init.d/simplehelp start"
     stop program = "/etc/init.d/simplehelp stop"



--
View this message in context: 
http://nongnu.13855.n7.nabble.com/Configuring-monit-to-keep-application-running-tp189859p189861.html
Sent from the monit-general mailing list archive at Nabble.com.

--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

Reply via email to