Skip to content

Commit

Permalink
Preserve cookie file
Browse files Browse the repository at this point in the history
  • Loading branch information
pvizeli committed Feb 24, 2020
1 parent 02cb41e commit 4b92285
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions rootfs/etc/services.d/pulseaudio/run
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@
pulseaudio --system -vvv &
PULSE_PID=$!

while [ ! -f /data/internal/cookie_unix ]; do
bashio::log.debug "Waiting for cookie files"
sleep 1
done
if [ ! -f /data/external/cookie_unix ]; then
while [ ! -f /data/internal/cookie_unix ]; do
bashio::log.debug "Waiting for cookie files"
sleep 1
done

cp /data/internal/cookie_unix /data/external/cookie_unix
bashio::log.info "Preserve UNIX session auth cookie"
cp -f /data/internal/cookie_unix /data/external/cookie_unix
chmod 640 /data/external/cookie_unix
fi

wait $PULSE_PID
wait ${PULSE_PID}

0 comments on commit 4b92285

Please sign in to comment.