Hi guys,
I'm trying to monitor a ruby process. I followed this guide:
http://mmonit.com/wiki/Monit/FAQ#pidfile in order to create the pid
file, but I'm a little bit confused.
In the FAQ they say to create the pid file in this way: echo $$ >
/var/run/xyz.pid; but at that stage the pid number I get is the one of
the bash script and not the one of the ruby process. So I get the
wrong process monitored.
Another thing: if I try to stop&start the service, it seems that it
tries to launch the bash file twice, so 2 processes at the end of the
restart.
What am I doing wrong?