From 093470d27d6800f60059315d54a824c6944f8645 Mon Sep 17 00:00:00 2001 From: Fredrik Eriksson Date: Fri, 26 Jul 2024 10:46:59 +0200 Subject: [PATCH] Ignore user service on systemd Instead emit warning about the need to log out and log in again --- sau/services.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sau/services.py b/sau/services.py index c4577d2..a47e73f 100644 --- a/sau/services.py +++ b/sau/services.py @@ -141,6 +141,8 @@ def restart_services(): continue elif unit_type != 'service': log.warning(f'not restarting non-service unit "{unit}"; owner of {proc}') + elif name.startswith('user@'): + log.warning(f'Not restarting user service {unit}; please log out and log in again') else: _ret, enabled, _err = sau.helpers.exec_cmd([ '/usr/bin/systemctl', 'is-enabled', unit ]) enabled = enabled.strip()