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:
parent
74f07c66be
commit
0ef60aeacb
1 changed files with 3 additions and 5 deletions
|
@ -625,11 +625,9 @@ class LinuxService(Service):
|
||||||
cleanout = status_stdout.lower().replace(self.name.lower(), '')
|
cleanout = status_stdout.lower().replace(self.name.lower(), '')
|
||||||
if "stop" in cleanout:
|
if "stop" in cleanout:
|
||||||
self.running = False
|
self.running = False
|
||||||
elif "run" in cleanout and "not" in cleanout:
|
elif "run" in cleanout:
|
||||||
self.running = False
|
self.running = ("not " in cleanout)
|
||||||
elif "run" in cleanout and "not" not in cleanout:
|
elif "start" in cleanout and "not " not in cleanout:
|
||||||
self.running = True
|
|
||||||
elif "start" in cleanout and "not" not in cleanout:
|
|
||||||
self.running = True
|
self.running = True
|
||||||
elif 'could not access pid file' in cleanout:
|
elif 'could not access pid file' in cleanout:
|
||||||
self.running = False
|
self.running = False
|
||||||
|
|
Loading…
Reference in a new issue