input-event-daemon: systemd support
authorAlex Suykov <alex.suykov@gmail.com>
Sat, 23 May 2015 10:04:42 +0000 (13:04 +0300)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 13 Jul 2015 18:02:29 +0000 (20:02 +0200)
Signed-off-by: Alex Suykov <alex.suykov@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/input-event-daemon/input-event-daemon.mk
package/input-event-daemon/input-event-daemon.service [new file with mode: 0644]

index 67b8cc4ba6c8cb9f983c3afbdc1b6c8c2f0f1393..0d23037ff6d1d45241dff3188fb6e9a3bd7aef42 100644 (file)
@@ -27,4 +27,12 @@ define INPUT_EVENT_DAEMON_INSTALL_INIT_SYSV
                $(TARGET_DIR)/etc/init.d/S99input-event-daemon
 endef
 
+define INPUT_EVENT_DAEMON_INSTALL_INIT_SYSTEMD
+       $(INSTALL) -D -m 644 package/input-event-daemon/input-event-daemon.service \
+               $(TARGET_DIR)/usr/lib/systemd/system/input-event-daemon.service
+       mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
+       ln -sf /usr/lib/systemd/system/input-event-daemon.service \
+               $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/input-event-daemon.service
+endef
+
 $(eval $(generic-package))
diff --git a/package/input-event-daemon/input-event-daemon.service b/package/input-event-daemon/input-event-daemon.service
new file mode 100644 (file)
index 0000000..d91e655
--- /dev/null
@@ -0,0 +1,9 @@
+[Unit]
+Description=Input Event Daemon
+
+[Service]
+ExecStart=/usr/bin/input-event-daemon --no-daemon
+Restart=always
+
+[Install]
+WantedBy=multi-user.target