Metaswitch/sprout — pull request #432 by mirw (2014-03-04 11:31:25+00:00)
Title: [Reviewer: Graeme] Ensure that monit doesn't monitor poll_restund.sh rather than restund

Graeme,

Please can you review this fix to the restund issue you saw? The problem is that monit monitors restund by process name, not PID file, and the regular expression it used was just `restund` (which also matches `poll_restund.sh`). When I was testing, `restund` always had a lower PID than `poll_restund.sh`, so monit picked `restund` in preference to `poll_restund.sh`. In the instance you saw, `poll_restund.sh` had the lower PID, so monit decided that it was the true restund process and consequently decided that restund was broken.

Matt