mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
systemd: add systemwide pipewire-pulse files
We can and it works, so why not.
This commit is contained in:
parent
9ca9579978
commit
dea6fa7f4c
3 changed files with 43 additions and 1 deletions
|
|
@ -3,13 +3,19 @@ if get_option('systemd-system-unit-dir') != ''
|
|||
systemd_system_services_dir = get_option('systemd-system-unit-dir')
|
||||
endif
|
||||
|
||||
install_data(sources : ['pipewire.socket', 'pipewire-manager.socket'],
|
||||
install_data(sources : ['pipewire.socket', 'pipewire-manager.socket', 'pipewire-pulse.socket' ],
|
||||
install_dir : systemd_system_services_dir)
|
||||
|
||||
systemd_config = configuration_data()
|
||||
systemd_config.set('PW_BINARY', pipewire_bindir / 'pipewire')
|
||||
systemd_config.set('PW_PULSE_BINARY', pipewire_bindir / 'pipewire-pulse')
|
||||
|
||||
configure_file(input : 'pipewire.service.in',
|
||||
output : 'pipewire.service',
|
||||
configuration : systemd_config,
|
||||
install_dir : systemd_system_services_dir)
|
||||
|
||||
configure_file(input : 'pipewire-pulse.service.in',
|
||||
output : 'pipewire-pulse.service',
|
||||
configuration : systemd_config,
|
||||
install_dir : systemd_system_services_dir)
|
||||
|
|
|
|||
24
src/daemon/systemd/system/pipewire-pulse.service.in
Normal file
24
src/daemon/systemd/system/pipewire-pulse.service.in
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
[Unit]
|
||||
Description=PipeWire PulseAudio Service
|
||||
Requires=pipewire-pulse.socket
|
||||
Wants=pipewire.service pipewire-session-manager.service
|
||||
After=pipewire.service pipewire-session-manager.service
|
||||
|
||||
[Service]
|
||||
LockPersonality=yes
|
||||
MemoryDenyWriteExecute=yes
|
||||
NoNewPrivileges=yes
|
||||
SystemCallArchitectures=native
|
||||
SystemCallFilter=@system-service
|
||||
Type=simple
|
||||
AmbientCapabilities=CAP_SYS_NICE
|
||||
ExecStart=@PW_PULSE_BINARY@
|
||||
Restart=on-failure
|
||||
User=pipewire
|
||||
Environment=PIPEWIRE_RUNTIME_DIR=%t/pipewire
|
||||
Environment=PULSE_RUNTIME_PATH=%t/pulse
|
||||
|
||||
[Install]
|
||||
Also=pipewire-pulse.socket
|
||||
WantedBy=pipewire.service
|
||||
|
||||
12
src/daemon/systemd/system/pipewire-pulse.socket
Normal file
12
src/daemon/systemd/system/pipewire-pulse.socket
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
[Unit]
|
||||
Description=PipeWire PulseAudio System Socket
|
||||
|
||||
[Socket]
|
||||
Priority=6
|
||||
ListenStream=%t/pulse/native
|
||||
SocketUser=pipewire
|
||||
SocketGroup=pipewire
|
||||
SocketMode=0660
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
||||
Loading…
Add table
Add a link
Reference in a new issue