Commit 7ee5eb93 authored by Alex Suykov's avatar Alex Suykov Committed by Thomas Petazzoni
Browse files

triggerhappy: systemd support



[Thomas: use a relative symbolic link.]

Signed-off-by: default avatarAlex Suykov <alex.suykov@gmail.com>
Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
parent b7afea95
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -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))
+9 −0
Original line number Diff line number Diff line
[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