From 0205717cb9d633bd2b124d9825bca10bdc48c0cd Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Fri, 10 Apr 2026 08:25:05 +0200 Subject: [PATCH] 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. --- ct/bentopdf.sh | 5 +++++ install/bentopdf-install.sh | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/ct/bentopdf.sh b/ct/bentopdf.sh index 1116143b8..f4662bee9 100644 --- a/ct/bentopdf.sh +++ b/ct/bentopdf.sh @@ -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" diff --git a/install/bentopdf-install.sh b/install/bentopdf-install.sh index 9c09ba7a0..9b46260f8 100644 --- a/install/bentopdf-install.sh +++ b/install/bentopdf-install.sh @@ -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"