Compare commits

..

3 Commits

Author SHA1 Message Date
MickLesk b3fb089b97 Remove explanatory comment 2026-07-21 23:08:21 +02:00
MickLesk 7959a46269 Back up snappdf's Chromium download to avoid re-fetching on every update
vendor/bin/snappdf download is idempotent: it exits immediately without
downloading if versions/revision.txt already exists, and PDF generation
doesn't check that version against the installed snappdf package - it
just uses whatever's in versions/. So the cached Chromium build survives
just fine across an update via the existing backup/restore mechanism.
Add vendor/beganovich/snappdf/versions to create_backup/restore_backup;
keep the snappdf download call only as a safety net for when the backup
doesn't have it yet (e.g. the first update after this fix ships).
2026-07-21 23:03:53 +02:00
MickLesk 745bc62978 Re-download snappdf Chromium after Invoice Ninja updates
update_script() redeploys /opt/invoiceninja via CLEAN_INSTALL, which
wipes vendor/beganovich/snappdf/versions. That path isn't covered by
create_backup/restore_backup, so the Chromium binary snappdf needs for
PDF generation was missing after every update, breaking PDFs (#15942).
Re-run the same "vendor/bin/snappdf download" step the install script
already does, right after the backup is restored.
2026-07-21 22:58:31 +02:00
3 changed files with 8 additions and 7 deletions
+7 -1
View File
@@ -35,12 +35,18 @@ function update_script() {
systemctl stop supervisor nginx php8.4-fpm
msg_ok "Stopped Services"
create_backup /opt/invoiceninja/.env /opt/invoiceninja/storage /opt/invoiceninja/public/storage
create_backup /opt/invoiceninja/.env /opt/invoiceninja/storage /opt/invoiceninja/public/storage /opt/invoiceninja/vendor/beganovich/snappdf/versions
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "invoiceninja" "invoiceninja/invoiceninja" "prebuild" "latest" "/opt/invoiceninja" "invoiceninja.tar.gz"
restore_backup
msg_info "Verifying Chromium for PDF Generation"
cd /opt/invoiceninja
$STD ./vendor/bin/snappdf download
chown -R www-data:www-data /opt/invoiceninja/vendor/beganovich/snappdf/versions
msg_ok "Verified Chromium for PDF Generation"
msg_info "Running Migrations"
cd /opt/invoiceninja
$STD php artisan migrate --force
+1 -1
View File
@@ -11,7 +11,7 @@ var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}"
var_disk="${var_disk:-8}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
var_version="${var_version:-12}"
var_arm64="${var_arm64:-yes}"
var_unprivileged="${var_unprivileged:-1}"
-5
View File
@@ -24,11 +24,6 @@ if [[ ! "$CONFIRM" =~ ^([yY][eE][sS]|[yY])$ ]]; then
exit 10
fi
msg_info "Switching SSH to classic (non-socket-activated) mode"
systemctl disable --now ssh.socket &>/dev/null || true
systemctl enable --now ssh &>/dev/null || true
msg_ok "Switched SSH to classic mode"
msg_info "Installing NextCloudPi (Patience)"
$STD bash <(curl -fsSL https://raw.githubusercontent.com/nextcloud/nextcloudpi/master/install.sh)
msg_ok "Installed NextCloudPi"