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>
This commit is contained in:
Alex Suykov 2015-05-23 13:06:55 +03:00 committed by Thomas Petazzoni
parent 920b50b7e0
commit c42f6907fa
2 changed files with 19 additions and 0 deletions

View File

@ -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))

View File

@ -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