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

Merge pull request #1867 from c0rner/devel

get_service_status() is now using self.service_control() to check status
This commit is contained in:
Michael DeHaan 2013-01-18 15:15:07 -08:00
commit fa953ba6b3

View file

@ -300,7 +300,8 @@ class LinuxService(Service):
self.svc_initctl = location['initctl'] self.svc_initctl = location['initctl']
def get_service_status(self): def get_service_status(self):
rc, status_stdout, status_stderr = self.execute_command("%s %s status %s" % (self.svc_cmd, self.name, self.arguments)) self.action = "status"
rc, status_stdout, status_stderr = self.service_control()
# Check if we got upstart on the system and then the job state # Check if we got upstart on the system and then the job state
if self.svc_initctl != None and self.running is None: if self.svc_initctl != None and self.running is None: