diff options
author | Brian Coca <brian.coca+git@gmail.com> | 2017-01-09 11:15:23 -0500 |
---|---|---|
committer | Brian Coca <brian.coca+git@gmail.com> | 2017-01-09 11:15:23 -0500 |
commit | 6e558aa4296b00d1056eb773bb0d6ab81b1a0f11 (patch) | |
tree | 7d6dcfdd8c65ff252fd5a745f081ea30f689c321 | |
parent | b593828f08430a26271049dc8ad0129229c7ff0e (diff) | |
download | ansible-modules-core-6e558aa4296b00d1056eb773bb0d6ab81b1a0f11.tar.gz |
backport of service fix
-rw-r--r-- | system/service.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/system/service.py b/system/service.py index bf4ef164..04c671c9 100644 --- a/system/service.py +++ b/system/service.py @@ -602,11 +602,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 |