From 2707534fc99e706114bcc6f6f4cfa20cc68156af Mon Sep 17 00:00:00 2001 From: Patrick Williams Date: Thu, 6 Oct 2022 07:31:37 -0500 Subject: systemd: use runstatedir On newer versions of systemd, there is an expectation that `/run` is used instead of `/var/run`. The current service file template can result in the following error message in the service: ``` systemd[1]: /lib/systemd/system/usbmuxd.service:7: PIDFile= references a path below legacy directory /var/run/, updating /var/run/usbmuxd.pid → /run/usbmuxd.pid; please update the unit file accordingly. ``` Prefer the `@runstatedir@` over `@localstatedir/run@` pattern as suggested by [1]. [1]: https://www.gnu.org/prep/standards/html_node/Directory-Variables.html Signed-off-by: Patrick Williams --- systemd/Makefile.am | 2 +- systemd/usbmuxd.service.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'systemd') diff --git a/systemd/Makefile.am b/systemd/Makefile.am index a23f1d1..1d40c25 100644 --- a/systemd/Makefile.am +++ b/systemd/Makefile.am @@ -1,7 +1,7 @@ edit = \ $(SED) -r \ -e 's|@sbindir[@]|$(sbindir)|g' \ - -e 's|@localstatedir[@]|$(localstatedir)|g' \ + -e 's|@runstatedir[@]|$(runstatedir)|g' \ < $< > $@ || rm $@ if WANT_SYSTEMD diff --git a/systemd/usbmuxd.service.in b/systemd/usbmuxd.service.in index bee2476..3a27aee 100644 --- a/systemd/usbmuxd.service.in +++ b/systemd/usbmuxd.service.in @@ -4,4 +4,4 @@ Documentation=man:usbmuxd(8) [Service] ExecStart=@sbindir@/usbmuxd --user usbmux --systemd -PIDFile=@localstatedir@/run/usbmuxd.pid +PIDFile=@runstatedir@/usbmuxd.pid -- cgit v1.1-32-gdbae