Ensure ~/.config/pulse is owned by the default user

This commit is contained in:
Josh.5
2022-10-10 16:54:26 +13:00
parent 2c5da29701
commit 0d2da789ef

View File

@@ -9,8 +9,13 @@ if [ "${MODE}" == "s" ] | [ "${MODE}" == "secondary" ]; then
sed -i 's|^; flat-volumes.*$|flat-volumes = yes|' /etc/pulse/daemon.conf
else
echo "Configure pulseaudio to pipe audio to a socket"
mkdir -p ${PULSE_SOCKET_DIR}
# Ensure pulseaudio directories have the correct permissions
mkdir -p \
${PULSE_SOCKET_DIR} \
/home/${USER}/.config/pulse
chmod -R a+rw ${PULSE_SOCKET_DIR}
chown -R ${PUID}:${PGID} /home/${USER}/.config/pulse
# Configure the palse audio socket
sed -i "s|^; default-server.*$|default-server = ${PULSE_SERVER}|" /etc/pulse/client.conf