mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-04-25 11:25:05 +02:00
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:
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user