Cookie file and other default parameters (#231)

* adding a more robust system around the cookie file and add other default values for parameters
* removed duplicate PulseAudio running message
This commit is contained in:
Florian Asche authored and GitHub committed 2026-03-11 21:03:21 +01:00
1 parent 735731b63e
commit 043e8fb1ff
4 files changed
+31 -24

No files matched your search

+12 -5
View File
@@ -82,10 +82,18 @@ fi
# Add cookie file for pulseaudio to prevent errors
if [ ! -f "$PULSE_COOKIE" ]; then
echo "Creating PulseAudio cookie file"
touch "$PULSE_COOKIE"
chmod 600 "$PULSE_COOKIE"
PULSE_COOKIE=${PULSE_COOKIE:-"/run/user/1000/pulse/cookie"}
if [[ "$PULSE_COOKIE" != "DISABLED" ]]; then
if [ ! -f "$PULSE_COOKIE" ]; then
echo "PulseAudio cookie file not found at $PULSE_COOKIE"
PULSE_COOKIE="/app/configuration/tmp_pulse_cookie"
echo "changed PULSE_COOKIE to $PULSE_COOKIE"
if [ ! -f "$PULSE_COOKIE" ]; then
echo "Creating PulseAudio cookie file at $PULSE_COOKIE"
touch "$PULSE_COOKIE"
chmod 600 "$PULSE_COOKIE"
fi
fi
fi
@@ -110,7 +118,6 @@ for i in $(seq 1 $CP_MAX_RETRIES); do
echo "⏳ PulseAudio not running yet, retrying in $CP_RETRY_DELAY s..."
sleep $CP_RETRY_DELAY
done
echo "✅ PulseAudio is running"
### Start application