also restart static services

This commit is contained in:
Fredrik Eriksson 2024-07-19 17:27:40 +02:00
parent e0cb7b8ca0
commit 76639d8472
Signed by: feffe
GPG Key ID: E6B5580B853D322B

View File

@ -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