From 374230d387261f2636360f9c46b5aec5b4c44e99 Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Fri, 28 Aug 2026 13:11:22 +0200 Subject: [PATCH] calibre-web: point cps at explicit db path, src-layout package has no default anymore (#16832) --- ct/calibre-web.sh | 12 ++++++++---- install/calibre-web-install.sh | 3 ++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ct/calibre-web.sh b/ct/calibre-web.sh index 91ed933d5..caaace9cb 100644 --- a/ct/calibre-web.sh +++ b/ct/calibre-web.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash -source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main" +_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func" +source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func") # Copyright (c) 2021-2026 community-scripts ORG # Author: mikolaj92 # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE @@ -35,8 +37,7 @@ function update_script() { systemctl stop calibre-web msg_ok "Stopped Service" - create_backup /opt/calibre-web/app.db \ - /opt/calibre-web/data + create_backup /opt/calibre-web/data CLEAN_INSTALL=1 fetch_and_deploy_gh_release "Calibre-Web" "janeczku/calibre-web" "prebuild" "latest" "/opt/calibre-web" "calibreweb*.tar.gz" setup_uv @@ -48,7 +49,10 @@ function update_script() { $STD uv pip install --python /opt/calibre-web/.venv/bin/python --no-cache-dir . msg_ok "Installed Dependencies" - sed -i 's|^ExecStart=.*|ExecStart=/opt/calibre-web/.venv/bin/cps|' /etc/systemd/system/calibre-web.service + sed -i 's|^ExecStart=.*|ExecStart=/opt/calibre-web/.venv/bin/cps -p /opt/calibre-web/data/app.db|' /etc/systemd/system/calibre-web.service + if ! grep -q '^Environment=HOME=' /etc/systemd/system/calibre-web.service; then + sed -i '/^ExecStart=/i Environment=HOME=/opt/calibre-web/data' /etc/systemd/system/calibre-web.service + fi $STD systemctl daemon-reload restore_backup diff --git a/install/calibre-web-install.sh b/install/calibre-web-install.sh index 04bff5ed8..cf1098e7b 100644 --- a/install/calibre-web-install.sh +++ b/install/calibre-web-install.sh @@ -53,8 +53,9 @@ After=network.target Type=simple User=root Environment="QTWEBENGINE_CHROMIUM_FLAGS=--no-sandbox" +Environment=HOME=/opt/calibre-web/data WorkingDirectory=/opt/calibre-web -ExecStart=/opt/calibre-web/.venv/bin/cps +ExecStart=/opt/calibre-web/.venv/bin/cps -p /opt/calibre-web/data/app.db Restart=on-failure RestartSec=5