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

improved negative service status handling

This is still far from optimal but the nature of the initscripts does not really allow for much better.
fixes #20028
This commit is contained in:
Brian Coca 2017-01-09 11:07:54 -05:00
parent 74f07c66be
commit 0ef60aeacb

View file

@ -625,11 +625,9 @@ class LinuxService(Service):
cleanout = status_stdout.lower().replace(self.name.lower(), '')
if "stop" in cleanout:
self.running = False
elif "run" in cleanout and "not" in cleanout:
self.running = False
elif "run" in cleanout and "not" not in cleanout:
self.running = True
elif "start" in cleanout and "not" not in cleanout:
elif "run" in cleanout:
self.running = ("not " in cleanout)
elif "start" in cleanout and "not " not in cleanout:
self.running = True
elif 'could not access pid file' in cleanout:
self.running = False