daemon: Add "stop" argument to start-pulseaudio-x11 script

As contradicting as it sounds, seems better than changing the script
name. This "stop" argument makes it unload all X11 related modules,
as opposed to the default behavior.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/467>
This commit is contained in:
Carlos Garnacho 2020-11-04 11:10:01 +01:00 committed by PulseAudio Marge Bot
parent 4f821adb55
commit 877889da60

View file

@ -17,6 +17,25 @@
set -e
if [ -n "$1" ] ; then
case $1 in
stop)
@PACTL_BINARY@ unload-module module-x11-publish > /dev/null
@PACTL_BINARY@ unload-module module-x11-cork-request > /dev/null
@PACTL_BINARY@ unload-module module-device-manager > /dev/null
@PACTL_BINARY@ unload-module module-x11-xsmp > /dev/null
exit 0
;;
start)
# Let it continue further down
;;
*)
echo "Unknown argument $1"
exit 1
;;
esac
fi
if [ x"$DISPLAY" != x ] ; then
@PACTL_BINARY@ load-module module-x11-publish "display=$DISPLAY xauthority=$XAUTHORITY" > /dev/null