1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Update service.py

Ensure "initctl status servicename" passes along arguments to check correct instance.
This commit is contained in:
Jonan 2017-03-02 16:58:31 +08:00 committed by Brian Coca
parent c536f7789b
commit 088b930808

View file

@ -622,7 +622,7 @@ class LinuxService(Service):
# if we have decided the service is managed by upstart, we check for some additional output...
if self.svc_initctl and self.running is None:
# check the job status by upstart response
initctl_rc, initctl_status_stdout, initctl_status_stderr = self.execute_command("%s status %s" % (self.svc_initctl, self.name))
initctl_rc, initctl_status_stdout, initctl_status_stderr = self.execute_command("%s status %s %s" % (self.svc_initctl, self.name, self.arguments ))
if "stop/waiting" in initctl_status_stdout:
self.running = False
elif "start/running" in initctl_status_stdout: