* [Buildroot] [PATCH v2] acpid: Add systemd service
@ 2018-11-13 20:17 Alexander Sverdlin
2018-11-13 21:03 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Alexander Sverdlin @ 2018-11-13 20:17 UTC (permalink / raw)
To: buildroot
This one is based on Archlinux's service file.
Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
---
package/acpid/acpid.mk | 8 ++++++++
package/acpid/acpid.service | 9 +++++++++
2 files changed, 17 insertions(+)
create mode 100644 package/acpid/acpid.service
diff --git a/package/acpid/acpid.mk b/package/acpid/acpid.mk
index 48fe005e5e..514fd31fe6 100644
--- a/package/acpid/acpid.mk
+++ b/package/acpid/acpid.mk
@@ -10,6 +10,14 @@ ACPID_SITE = http://downloads.sourceforge.net/project/acpid2
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
diff --git a/package/acpid/acpid.service b/package/acpid/acpid.service
new file mode 100644
index 0000000000..5252b52f5f
--- /dev/null
+++ b/package/acpid/acpid.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=ACPI event daemon
+Documentation=man:acpid(8)
+
+[Service]
+ExecStart=/usr/sbin/acpid --foreground --netlink
+
+[Install]
+WantedBy=multi-user.target
--
2.19.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-11-13 21:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-13 20:17 [Buildroot] [PATCH v2] acpid: Add systemd service Alexander Sverdlin
2018-11-13 21:03 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox