Update 99-run.sh

This commit is contained in:
Alexandre
2025-08-04 23:21:54 +02:00
committed by GitHub
parent 21b29fe3d4
commit 55e1e4b523

View File

@@ -64,6 +64,11 @@ if [ -n "${ALSA_CARD:-}" ]; then
done
fi
# Define permissions for audio
AUDIO_GID=$(stat -c %g /dev/snd/* | head -n1) && \
( groupmod -o -g "$AUDIO_GID" audio 2>/dev/null || groupadd -o -g "$AUDIO_GID" audio || true ) && \
usermod -aG audio "${USER:-pi}" || true
# Fix timezone as per installer
CURRENT_TIMEZONE="$(timedatectl show --value --property=Timezone)"
[ -f /etc/timezone ] && echo "$CURRENT_TIMEZONE" | sudo tee /etc/timezone > /dev/null