From: Alex Suykov Date: Sat, 23 May 2015 10:14:07 +0000 (+0300) Subject: triggerhappy: systemd support X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7ee5eb933d9d148d31598adafc41cf7fd4c76c9a;p=buildroot.git triggerhappy: systemd support [Thomas: use a relative symbolic link.] Signed-off-by: Alex Suykov Signed-off-by: Thomas Petazzoni --- diff --git a/package/triggerhappy/triggerhappy.mk b/package/triggerhappy/triggerhappy.mk index d3dfc6a18e..3a68e50945 100644 --- a/package/triggerhappy/triggerhappy.mk +++ b/package/triggerhappy/triggerhappy.mk @@ -34,4 +34,12 @@ define TRIGGERHAPPY_INSTALL_INIT_SYSV $(TARGET_DIR)/etc/init.d/S10triggerhappy endef +define TRIGGERHAPPY_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/triggerhappy/triggerhappy.service \ + $(TARGET_DIR)/usr/lib/systemd/system/triggerhappy.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -sf ../../../../usr/lib/systemd/system/triggerhappy.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/triggerhappy.service +endef + $(eval $(generic-package)) diff --git a/package/triggerhappy/triggerhappy.service b/package/triggerhappy/triggerhappy.service new file mode 100644 index 0000000000..8449c1c935 --- /dev/null +++ b/package/triggerhappy/triggerhappy.service @@ -0,0 +1,9 @@ +[Unit] +Description=Triggerhappy daemon + +[Service] +ExecStart=/usr/sbin/thd --triggers /etc/triggerhappy/triggers.d --socket /var/run/thd.socket --user nobody /dev/input/event* +Restart=always + +[Install] +WantedBy=multi-user.target