This one is based on Archlinux's service file.
Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
ACPID_LICENSE = GPL-2.0+
ACPID_LICENSE_FILES = COPYING
+define ACPID_INSTALL_INIT_SYSTEMD
+ $(INSTALL) -D -m 0755 package/acpid/acpid.service \
+ $(TARGET_DIR)/usr/lib/systemd/system/acpid.service
+ mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
+ ln -sf ../../../../usr/lib/systemd/system/acpid.service \
+ $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/acpid.service
+endef
+
define ACPID_INSTALL_INIT_SYSV
$(INSTALL) -D -m 0755 package/acpid/S02acpid \
$(TARGET_DIR)/etc/init.d/S02acpid
--- /dev/null
+[Unit]
+Description=ACPI event daemon
+Documentation=man:acpid(8)
+
+[Service]
+ExecStart=/usr/sbin/acpid --foreground --netlink
+
+[Install]
+WantedBy=multi-user.target