I realised that you had already added Matthew's unit file to userv, so
I've reworked the second patch to improve and use that unit file instead
of adding a Debian-specific one.
I've also force-pushed this to the bjh21-hacks branch on Salsa:
https://salsa.debian.org/bjh21/userv
and it's passed Salsa CI:
https://salsa.debian.org/bjh21/userv/-/pipelines/910537
--
Ben Harris
diff --git a/debian/userv.install b/debian/userv.install
new file mode 100644
index 0000000..51da57e
--- /dev/null
+++ b/debian/userv.install
@@ -0,0 +1 @@
+userv.service /usr/lib/systemd/system
diff --git a/userv.service b/userv.service
index 63f2781..930bf5f 100644
--- a/userv.service
+++ b/userv.service
@@ -1,12 +1,17 @@
[Unit]
Description=User services (security boundary) daemon
-After=syslog.target remote-fs.target
+Documentation=man:uservd(8)
+Documentation=file:/usr/share/doc/userv/spec.html/index.html
+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
+# uservd exits with 1 when killed with SIGTERM.
+SuccessExitStatus=1
[Install]
WantedBy=multi-user.target