From 9b2dcc4e63ef3adf77c15a0c7d456c43c38e051b Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Fri, 15 Aug 2025 14:17:22 +0100 Subject: [PATCH] userv.service: use RuntimeDirectory= to create /run/userv This means that systemd can create the directory itself without having to spawn a shell. systemd's documentation says that /var/run must be a symlink to /run, so it's fine for the systemd unit file to create /run/userv and assume that also creates /var/run/userv. --- userv.service | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/userv.service b/userv.service index a0f77e6..fe599fe 100644 --- a/userv.service +++ b/userv.service @@ -6,7 +6,8 @@ After=syslog.target [Service] Type=forking -ExecStartPre=/bin/sh -c 'test -d /var/run/userv || mkdir -m700 /var/run/userv' +RuntimeDirectory=userv +RuntimeDirectoryMode=0700 ExecStart=/usr/sbin/uservd -daemon KillMode=process -- 2.30.2