On Sun, Apr 13, 2025 at 04:10:26PM +0200, Michael Biebl wrote:
Am 13.04.2025 um 15:24 schrieb Marc Haber:
On Sat, Apr 12, 2025 at 03:40:54PM +0200, Michael Biebl wrote:
Would
ConditionUser=!@system
be an option here for those user services?
my ansible user is not in the system user range, but still a system
user, as it doesn't originate from a package.
That's a bit weird. If it's not in the system range, I personally
wouldn't consider it a system user.
Let's call it "a technical user". Such things exist by the hundred in
bigger installations.
I'd really like the socket unit to be stopped on logout.
The systemd --user instance should be stopped when the user logs out,
or rather when the last user session ends (a user could be logged in
multiple times and the systemd --user instance is refcounted so to
speak).
So the files in /run/user/ID/systemd/units should vanish then? That
doesn't happen.
Things that can prevent that:
- lingering is enabled for that account
https://wiki.archlinux.org/title/Systemd/User#Automatic_start-up_of_systemd_user_instances
Not deliberately. Is it the default?
- Some process(es) refuse to die on logout and keep the session active.
Debian disables automatic killing of processes on logout, i.e. it
defaults to KillUserProcesses=no
https://wiki.archlinux.org/title/Systemd/User#Kill_user_processes_on_logout
It seems to be a socket unit that stays active.
Greetings
Marc
--
-----------------------------------------------------------------------------
Marc Haber | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany | lose things." Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature | How to make an American Quilt | Fax: *49 6224 1600421