From 76639d8472ba086a3d857425089f81877a195bc0 Mon Sep 17 00:00:00 2001 From: Fredrik Eriksson Date: Fri, 19 Jul 2024 17:27:40 +0200 Subject: [PATCH] also restart static services --- sau/services.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sau/services.py b/sau/services.py index 9d51225..dcc3de9 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 != 'enabled': + if enabled in ('enabled', 'static'): log.warning(f'Unit {name}.service has enable status: {enabled} - will only restart "enabled" services') else: service_name = name