From 6a67572e83c53b797859ed03e1fd59d704ea5d49 Mon Sep 17 00:00:00 2001 From: Matt Wright Date: Fri, 31 Aug 2012 11:03:14 -0400 Subject: [PATCH] Fix supervisorctl module after merge issue --- supervisorctl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/supervisorctl b/supervisorctl index 2f33c37ecd1..7cf55fb1fd3 100755 --- a/supervisorctl +++ b/supervisorctl @@ -19,10 +19,20 @@ # along with Ansible. If not, see . # +def _find_supervisorctl(): + paths = ['/usr/local/bin', '/usr/bin'] + + for p in paths: + e = p + '/supervisorctl' + if os.path.exists(e): + return e + + def _is_present(name): rc, out, err = _run('%s status' % _find_supervisorctl()) return name in out + def _is_running(name, supervisorctl): rc, out, err = _run('%s status %s' % (supervisorctl, name)) return 'RUNNING' in out