diff --git a/sau/services.py b/sau/services.py index dcc3de9..344e69f 100644 --- a/sau/services.py +++ b/sau/services.py @@ -144,7 +144,7 @@ def restart_services(): else: _ret, enabled, _err = sau.helpers.exec_cmd([ '/usr/bin/systemctl', 'is-enabled', unit ]) enabled = enabled.strip() - if enabled in ('enabled', 'static'): + if enabled not in ('enabled', 'static'): log.warning(f'Unit {name}.service has enable status: {enabled} - will only restart "enabled" services') else: service_name = name