Improvements to pulseaudio
- Add a DEBUGGING flag - Make the location of the unix socket configurable While I was here I moved all the priority configs in supervisord to the top. I like it better there
This commit is contained in:
@@ -11,13 +11,24 @@ else
|
||||
echo "Configure pulseaudio to pipe audio to a socket"
|
||||
mkdir -p /tmp/pulse
|
||||
chmod -R a+rw /tmp/pulse
|
||||
|
||||
# Configure the palse audio socket
|
||||
sed -i 's|^; default-server.*$|default-server = unix:/tmp/pulse/pulse-socket|' /etc/pulse/client.conf
|
||||
export PULSE_SERVER=${PULSE_SERVER:-unix:/tmp/pulse/pulse-socket}
|
||||
sed -i "s|^; default-server.*$|default-server = ${PULSE_SERVER}|" /etc/pulse/client.conf
|
||||
sed -i 's|^load-module module-native-protocol-unix.*$|load-module module-native-protocol-unix socket=/tmp/pulse/pulse-socket auth-anonymous=1|' \
|
||||
/etc/pulse/default.pa
|
||||
|
||||
# Disable pulseaudio from respawning (https://unix.stackexchange.com/questions/204522/how-does-pulseaudio-start)
|
||||
sed -i 's|^; autospawn.*$|autospawn = no|' /etc/pulse/client.conf
|
||||
sed -i 's|^; daemon-binary.*$|daemon-binary = /bin/true |' /etc/pulse/client.conf
|
||||
sed -i 's|^; daemon-binary.*$|daemon-binary = /bin/true|' /etc/pulse/client.conf
|
||||
|
||||
# Enable debug logging
|
||||
if [ "X${DEBUGGING:-}" == "X" ]; then
|
||||
sed -i 's|^; log-level.*$|log-level = debug|' /etc/pulse/daemon.conf
|
||||
fi
|
||||
|
||||
# Make startup script executable
|
||||
chmod +x /usr/bin/start-pulseaudio.sh
|
||||
fi
|
||||
chown -R ${USER} /etc/pulse
|
||||
|
||||
|
||||
Reference in New Issue
Block a user