mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
Add systemd socket activation files
Notify of jack graph changes
This commit is contained in:
parent
61424a4343
commit
29eb58f7a2
13 changed files with 83 additions and 20 deletions
1
src/daemon/systemd/meson.build
Normal file
1
src/daemon/systemd/meson.build
Normal file
|
|
@ -0,0 +1 @@
|
|||
subdir('user')
|
||||
15
src/daemon/systemd/user/meson.build
Normal file
15
src/daemon/systemd/user/meson.build
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
systemd_install_dir = '@0@/systemd/user'.format(get_option('libdir'))
|
||||
|
||||
pipewire_systemd_files = [
|
||||
'pipewire.socket',
|
||||
]
|
||||
|
||||
install_data(pipewire_systemd_files, install_dir : systemd_install_dir)
|
||||
|
||||
systemd_config = configuration_data()
|
||||
systemd_config.set('PW_BINARY', '@0@/pipewire'.format(pipewire_bindir))
|
||||
|
||||
configure_file(input : 'pipewire.service.in',
|
||||
output : 'pipewire.service',
|
||||
configuration : systemd_config,
|
||||
install_dir : systemd_install_dir)
|
||||
26
src/daemon/systemd/user/pipewire.service.in
Normal file
26
src/daemon/systemd/user/pipewire.service.in
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
[Unit]
|
||||
Description=Multimedia Service
|
||||
|
||||
# We require pipewire.socket to be active before starting the daemon, because
|
||||
# while it is possible to use the service without the socket, it is not clear
|
||||
# why it would be desirable.
|
||||
#
|
||||
# A user installing pipewire and doing `systemctl --user start pipewire`
|
||||
# will not get the socket started, which might be confusing and problematic if
|
||||
# the server is to be restarted later on, as the client autospawn feature
|
||||
# might kick in. Also, a start of the socket unit will fail, adding to the
|
||||
# confusion.
|
||||
#
|
||||
# After=pipewire.socket is not needed, as it is already implicit in the
|
||||
# socket-service relationship, see systemd.socket(5).
|
||||
Requires=pipewire.socket
|
||||
|
||||
[Service]
|
||||
# Note that notify will only work if --daemonize=no
|
||||
Type=notify
|
||||
ExecStart=@PW_BINARY@
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
Also=pipewire.socket
|
||||
WantedBy=default.target
|
||||
10
src/daemon/systemd/user/pipewire.socket
Normal file
10
src/daemon/systemd/user/pipewire.socket
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
[Unit]
|
||||
Description=Multimedia System
|
||||
|
||||
[Socket]
|
||||
Priority=6
|
||||
Backlog=5
|
||||
ListenStream=%t/pipewire-0
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
||||
Loading…
Add table
Add a link
Reference in a new issue