mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-10 13:29:58 -05:00
launch: Add systemd units for launching pulseaudio user instances
This commit is contained in:
parent
42156d2b5a
commit
e542e81004
4 changed files with 42 additions and 1 deletions
|
|
@ -95,6 +95,8 @@ EXTRA_DIST = \
|
|||
depmod.py \
|
||||
daemon/esdcompat.in \
|
||||
daemon/start-pulseaudio-x11.in \
|
||||
daemon/systemd/user/pulseaudio.service.in \
|
||||
daemon/systemd/user/pulseaudio.socket \
|
||||
utils/padsp.in \
|
||||
utils/qpaeq \
|
||||
modules/module-defs.h.m4 \
|
||||
|
|
@ -217,6 +219,14 @@ pax11publish_CFLAGS = $(AM_CFLAGS) $(X11_CFLAGS)
|
|||
pax11publish_LDADD = $(AM_LDADD) libpulse.la libpulsecommon-@PA_MAJORMINOR@.la $(X11_LIBS)
|
||||
pax11publish_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
|
||||
|
||||
if HAVE_SYSTEMD_DAEMON
|
||||
|
||||
systemduserunit_DATA = \
|
||||
pulseaudio.service \
|
||||
daemon/systemd/user/pulseaudio.socket
|
||||
|
||||
endif
|
||||
|
||||
###################################
|
||||
# Test programs #
|
||||
###################################
|
||||
|
|
@ -2152,7 +2162,7 @@ module_rygel_media_server_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
|
|||
###################################
|
||||
|
||||
CLEANFILES += daemon/pulseaudio.desktop
|
||||
DISTCLEANFILES = esdcompat client.conf default.pa system.pa daemon.conf start-pulseaudio-x11
|
||||
DISTCLEANFILES = esdcompat client.conf default.pa system.pa daemon.conf start-pulseaudio-x11 pulseaudio.service
|
||||
|
||||
if OS_IS_WIN32
|
||||
SYMLINK_PROGRAM=cd $(DESTDIR)$(bindir) && cp
|
||||
|
|
|
|||
10
src/daemon/systemd/user/pulseaudio.service.in
Normal file
10
src/daemon/systemd/user/pulseaudio.service.in
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
[Unit]
|
||||
Description=Sound Service
|
||||
|
||||
[Service]
|
||||
ExecStart=@PA_BINARY@ --daemonize=no
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
Also=pulseaudio.socket
|
||||
WantedBy=default.target
|
||||
10
src/daemon/systemd/user/pulseaudio.socket
Normal file
10
src/daemon/systemd/user/pulseaudio.socket
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
[Unit]
|
||||
Description=Sound System
|
||||
|
||||
[Socket]
|
||||
Priority=6
|
||||
Backlog=5
|
||||
ListenStream=%t/pulse/native
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
||||
Loading…
Add table
Add a link
Reference in a new issue