Add systemd socket activation files

Notify of jack graph changes
This commit is contained in:
Wim Taymans 2017-08-17 18:59:03 +02:00
parent 61424a4343
commit 29eb58f7a2
13 changed files with 83 additions and 20 deletions

View file

@ -0,0 +1 @@
subdir('user')

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

View 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

View file

@ -0,0 +1,10 @@
[Unit]
Description=Multimedia System
[Socket]
Priority=6
Backlog=5
ListenStream=%t/pipewire-0
[Install]
WantedBy=sockets.target