summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Suykov <alex.suykov@gmail.com>2015-05-23 13:06:55 +0300
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-07-15 00:10:52 +0200
commitc42f6907fa5f1cafcb5aedafe4fc9865d0b3fb4a (patch)
treec480e2d75370fed0b2b1fe9ad450b5b19bf34a05
parent920b50b7e0d7535899ccba77b85d3df57e2c2a2a (diff)
downloadbuildroot-c42f6907fa5f1cafcb5aedafe4fc9865d0b3fb4a.tar.gz
buildroot-c42f6907fa5f1cafcb5aedafe4fc9865d0b3fb4a.zip
pulseaudio: systemd support
[Thomas: - use relative path for the service symlink - slightly adjust the service description] Signed-off-by: Alex Suykov <alex.suykov@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-rw-r--r--package/pulseaudio/pulseaudio.mk8
-rw-r--r--package/pulseaudio/pulseaudio.service11
2 files changed, 19 insertions, 0 deletions
diff --git a/package/pulseaudio/pulseaudio.mk b/package/pulseaudio/pulseaudio.mk
index e68ca685c3..0fcfe38f92 100644
--- a/package/pulseaudio/pulseaudio.mk
+++ b/package/pulseaudio/pulseaudio.mk
@@ -123,6 +123,14 @@ define PULSEAUDIO_INSTALL_INIT_SYSV
$(TARGET_DIR)/etc/init.d/S50pulseaudio
endef
+define PULSEAUDIO_INSTALL_INIT_SYSTEMD
+ $(INSTALL) -D -m 644 package/pulseaudio/pulseaudio.service \
+ $(TARGET_DIR)/usr/lib/systemd/system/pulseaudio.service
+ mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
+ ln -sf ../../../../usr/lib/systemd/system/pulseaudio.service \
+ $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/pulseaudio.service
+endef
+
endif
$(eval $(autotools-package))
diff --git a/package/pulseaudio/pulseaudio.service b/package/pulseaudio/pulseaudio.service
new file mode 100644
index 0000000000..fc82f03392
--- /dev/null
+++ b/package/pulseaudio/pulseaudio.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=PulseAudio Sound System
+After=syslog.target
+
+[Service]
+UMask=077
+ExecStart=/usr/bin/pulseaudio --system --daemonize=no
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
OpenPOWER on IntegriCloud