mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-09-21 13:41:20 +02:00
/usr/bin/pipewire was not being killed previously. The order in which the processes are killed has been changed to avoid this error message from pipewire-media-session: [W][77952.698669] ms.core | [ media-session.c: 2211 core_error()] error id:0 seq:799 res:-32 (Broken pipe): connection error Additionally, pipewire-pulse is now started with the /usr/bin/ prefix, since a user may have another binary named pipewire in their $PATH.
23 lines
783 B
Bash
23 lines
783 B
Bash
#!/bin/sh
|
|
|
|
# We need to kill any existing pipewire instance to restore sound
|
|
pkill -u "${USER}" -fx "/usr/bin/pipewire -c pipewire-pulse.conf" 1>/dev/null 2>&1
|
|
pkill -u "${USER}" -fx /usr/bin/pipewire-media-session 1>/dev/null 2>&1
|
|
pkill -u "${USER}" -fx /usr/bin/wireplumber 1>/dev/null 2>&1
|
|
pkill -u "${USER}" -fx /usr/bin/pipewire 1>/dev/null 2>&1
|
|
|
|
exec /usr/bin/pipewire &
|
|
|
|
# wait for pipewire to start before attempting to start related daemons
|
|
while [ "$(pgrep -f /usr/bin/pipewire)" = "" ]; do
|
|
sleep 1
|
|
done
|
|
|
|
if [ -x /usr/bin/wireplumber ]; then
|
|
exec /usr/bin/wireplumber &
|
|
elif [ -x /usr/bin/pipewire-media-session ]; then
|
|
exec /usr/bin/pipewire-media-session &
|
|
fi
|
|
|
|
[ -f "/usr/share/pipewire/pipewire-pulse.conf" ] && exec /usr/bin/pipewire -c pipewire-pulse.conf &
|