pulseaudio: let systemd know the PID of the pulseaudio daemon
Otherwise, systemd will have to guess the PID of the service's main process. It guesses right most of the time, but sometimes it chooses the PID of the original pulseaudio process instead of the daemon that gets forked off. This caused the daemon to stop immediately after starting, breaking other apps that require the pulseaudio server to be running. Since the PID file is created in a user-specific runtime directory (and the service is meant for the whole system), modify the wrapper script to create a symlink to the PID file in a place where it can be obtained by systemd. https://jira.digi.com/browse/DEL-6795 Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
This commit is contained in:
parent
9c392c5b7c
commit
f3692de0c5
|
|
@ -9,3 +9,6 @@
|
|||
export DBUS_SESSION_BUS_ADDRESS=unix:path=$XDG_RUNTIME_DIR/bus
|
||||
|
||||
pulseaudio --start
|
||||
|
||||
# Create a symlink to the daemon's PID file in a more accesible directory
|
||||
ln -sf $XDG_RUNTIME_DIR/pulse/pid /run/pulse.pid
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ After=dbus.service
|
|||
|
||||
[Service]
|
||||
Type=forking
|
||||
PIDFile=/run/pulse.pid
|
||||
ExecStart=/etc/pulseaudio-init
|
||||
ExecStop=kill -HUP $MAINPID
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue