fix(bentopdf): create default config.json to avoid runtime 404

BentoPDF fetches /config.json at runtime. In our build/deploy flow this file
may be missing, causing noisy 404 errors in the browser console.

Create a minimal default config.json ({}), only when absent, during install
and update so custom configs are not overwritten.
This commit is contained in:
CanbiZ (MickLesk)
2026-04-10 08:25:05 +02:00
parent fbf73b6e23
commit 0205717cb9
2 changed files with 10 additions and 0 deletions

View File

@@ -51,6 +51,11 @@ function update_script() {
export SIMPLE_MODE=true
export VITE_USE_CDN=true
$STD npm run build:all
if [[ ! -f /opt/bentopdf/dist/config.json ]]; then
cat <<'EOF' >/opt/bentopdf/dist/config.json
{}
EOF
fi
msg_ok "Updated BentoPDF"
msg_info "Starting Service"

View File

@@ -26,6 +26,11 @@ export NODE_OPTIONS="--max-old-space-size=3072"
export SIMPLE_MODE=true
export VITE_USE_CDN=true
$STD npm run build:all
if [[ ! -f /opt/bentopdf/dist/config.json ]]; then
cat <<'EOF' >/opt/bentopdf/dist/config.json
{}
EOF
fi
msg_ok "Setup BentoPDF"
msg_info "Creating Service"