summarylogtreecommitdiffstats
path: root/irexec-system.service
diff options
context:
space:
mode:
authorMoritz Bruder2017-03-08 23:54:33 +0100
committerMoritz Bruder2017-03-08 23:57:55 +0100
commitb1d09e5121a9134635478c205683401e4691c532 (patch)
treefdd46ec0959896a5f15e0949c663d3de94581ef3 /irexec-system.service
parent77a96d55591e8be6bd7914f808869281a1bdbdb1 (diff)
downloadaur-b1d09e5121a9134635478c205683401e4691c532.tar.gz
Make unit files more robust
irexec will now restart on fail and abort. The service is now also provided for the root instance of systemd. For this service the username has to be passed as parameter. Then the irexec is run with that user while being able to depend on lircd.
Diffstat (limited to 'irexec-system.service')
-rw-r--r--irexec-system.service14
1 files changed, 14 insertions, 0 deletions
diff --git a/irexec-system.service b/irexec-system.service
new file mode 100644
index 000000000000..64addda079c5
--- /dev/null
+++ b/irexec-system.service
@@ -0,0 +1,14 @@
+# Run the service with the root instance of systemd but use a provided user for
+# the service.
+[Unit]
+Description=irexec as service
+Requires=lircd.service
+After=lircd.service
+
+[Service]
+User=%i
+ExecStart=/usr/bin/irexec
+Restart=always
+
+[Install]
+WantedBy=multi-user.target