mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00: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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user