fix(deploy): ALLOWED_EXTS idempotent pflegen — ergänzt 'webm' falls fehlt

This commit is contained in:
root 2026-05-14 03:48:08 +00:00
parent 11ab8b57bf
commit e75bc05421

View File

@ -52,6 +52,16 @@ elif ! grep -q "^SESSION_SECRET=" "$APP_DIR/lxc-frontend/.env"; then
echo " SESSION_SECRET nachgetragen."
fi
# ALLOWED_EXTS sicherstellen, dass 'webm' für Browser-Aufnahmen drin ist
if grep -q "^ALLOWED_EXTS=" "$APP_DIR/lxc-frontend/.env"; then
if ! grep -E "^ALLOWED_EXTS=.*\bwebm\b" "$APP_DIR/lxc-frontend/.env" >/dev/null; then
sed -i 's|^ALLOWED_EXTS=\(.*\)$|ALLOWED_EXTS=\1,webm|' "$APP_DIR/lxc-frontend/.env"
echo " ALLOWED_EXTS um 'webm' ergänzt (für Mikrofon-Aufnahmen)."
fi
else
echo "ALLOWED_EXTS=mp3,wav,m4a,mp4,ogg,flac,webm" >> "$APP_DIR/lxc-frontend/.env"
fi
mkdir -p /var/lib/voice-agent/uploads /var/lib/voice-agent/results
chown -R "$APP_USER:$APP_USER" /var/lib/voice-agent