My monitrc looks like this :
check process java with pidfile /opt/release/RUNNING_PID start program = "/bin/su -c /opt/release/start.sh root" stop program = "/bin/su -c /opt/release/stop.sh root" if failed host 127.0.0.1 port 80 type tcp then restart
and my stop.sh script simply looks like this :
echo "Test" > /opt/release/test.txt
When I do
sudo monit start java it starts my process correctly, but when I do
sudo monit stop java my stop.sh script is never called (test.txt is never created).
What am I missing here ?