chiark / gitweb /
clunk.service: Don't hard-code the location of /var/lib.
authorBen Harris <bjh21@bjh21.me.uk>
Thu, 27 Dec 2018 18:03:02 +0000 (18:03 +0000)
committerBen Harris <bjh21@bjh21.me.uk>
Thu, 27 Dec 2018 18:03:02 +0000 (18:03 +0000)
systemd provides the "%S" specifier to refer to the parent of the
StateDirectory, so use that.

clunk.service

index 398af7a76cd8380e85ca0b1f22d7d53f775605f1..6b3c85c1beec496aa9b06bde3f8e5895d48e7788 100644 (file)
@@ -7,7 +7,7 @@ Documentation=man:clunk(8)
 DynamicUser=true
 SupplementaryGroups=gpio
 StateDirectory=clunk
-ExecStart=clunk -f /var/lib/clunk/clunk.state -C pinctrl-bcm2835 -L 17
+ExecStart=clunk -f %S/clunk/clunk.state -C pinctrl-bcm2835 -L 17
 
 [Install]
 WantedBy=multi-user.target