mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-05-02 15:05:59 +00: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 SIMPLE_MODE=true
|
||||||
export VITE_USE_CDN=true
|
export VITE_USE_CDN=true
|
||||||
$STD npm run build:all
|
$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_ok "Updated BentoPDF"
|
||||||
|
|
||||||
msg_info "Starting Service"
|
msg_info "Starting Service"
|
||||||
|
|||||||
@@ -26,6 +26,11 @@ export NODE_OPTIONS="--max-old-space-size=3072"
|
|||||||
export SIMPLE_MODE=true
|
export SIMPLE_MODE=true
|
||||||
export VITE_USE_CDN=true
|
export VITE_USE_CDN=true
|
||||||
$STD npm run build:all
|
$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_ok "Setup BentoPDF"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
|
|||||||
Reference in New Issue
Block a user