Jan-Henrik Haukeland a écrit :

On 25. mai. 2009, at 09.35, Eric Pailleau wrote:

A solution with a wrapper script is given, but be aware that in pidfile is the PID of the wrapper script : if your program crashe (and not the wrapper), monit will still see a living PID and do nothing.

Actually not since the wrapper script uses exec, the program started will take "over" the process of the script.

yes, you are right, I did not saw it at first sight.

the only 'critic' I could give is that presence of pidfile is not tested
on 'stop' command.

it would better to do

test -s /var/run/xyz.pid && kill `cat /var/run/xyz.pid`

'test -s' test that the file exists and size is greater than zero.


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

Reply via email to