diff options
Diffstat (limited to 'system/systemd.py')
-rw-r--r-- | system/systemd.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/system/systemd.py b/system/systemd.py index 19fedce4..dcc493b8 100644 --- a/system/systemd.py +++ b/system/systemd.py @@ -384,7 +384,10 @@ def main(): if result['status']['ActiveState'] == 'active': action = 'stop' else: - action = module.params['state'][:-2] # remove 'ed' from restarted/reloaded + if result['status']['ActiveState'] != 'active': + action = 'start' + else: + action = module.params['state'][:-2] # remove 'ed' from restarted/reloaded result['state'] = 'started' if action: |