units: enable RemoveOnStop= for oomd and userdbd sockets

We usually don't care, but here the existence of socket
is public API to a certain degree and signals availability
of the service (userdbd in particular, oomd is checked in
core-varlink.c). Hence let's be more careful and remove them
if stopped.
This commit is contained in:
Mike Yuan
2025-04-30 21:23:19 +02:00
parent e803ec1e25
commit fd66dc60a0
2 changed files with 2 additions and 0 deletions

View File

@@ -21,6 +21,7 @@ ConditionPathExists=/proc/pressure/memory
[Socket]
ListenStream=/run/systemd/oom/io.systemd.ManagedOOM
SocketMode=0666
RemoveOnStop=yes
[Install]
WantedBy=sockets.target

View File

@@ -17,6 +17,7 @@ Before=sockets.target
ListenStream=/run/systemd/userdb/io.systemd.Multiplexer
Symlinks=/run/systemd/userdb/io.systemd.NameServiceSwitch /run/systemd/userdb/io.systemd.DropIn
SocketMode=0666
RemoveOnStop=yes
[Install]
WantedBy=sockets.target