previously on this list Martin Vaner contributed:

> When i run my script directly from console, the script is working 
> without any issues.
> This is another problem what i have encountered before.

Are you sure the script is returning 0 when run as whatever user monit
runs as?

In other words if you run the script as the monit user with && echo
"returns 0" afterwards does it echo?

p.s. A pid file existing is not the best check of whether a process
exists. You would be better off using the inbuilt process checker or
pgrep -f "replace with a regex of the processes unique string" despite
what any "howtos" tell you.


-- 
_______________________________________________________________________

'Write programs that do one thing and do it well. Write programs to work
together. Write programs to handle text streams, because that is a
universal interface'

(Doug McIlroy)

In Other Words - Don't design like polkit or systemd
_______________________________________________________________________

_______________________________________________________________________

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

Reply via email to