I want monit to check specific process and start it only when the depending filesystem is available.
check process Tomcat with pidfile /path/to/tomcat/TOMCAT.PID
depends on abc
start program = "../scripts/start_tomcat.sh"
stop program = "../scripts/stop_tomcat.sh -force"
check filesystem abc with path /path/to/abc
if does not exist then restart
In that above configuration, when filesystem goes down, monit is repeatedly start and stop the tomcat, which makes 8080 port in listen all the time. I want to make that start program runs only when filesystem is available. Not repeatedly start and stop it.