* fix(tools): improve error diagnostics and actionable hints across install functions
- Add _diagnose_deb_failure() helper: extracts package metadata from failed .deb installs,
detects PostgreSQL version conflicts (e.g., postgresql-16-vchord with PG17 active),
lists unmet dependencies, and provides specific actionable hints
- Replace all 4 generic 'Both apt and dpkg installation failed' messages in
fetch_and_deploy_{codeberg,gh,gl}_release and fetch_and_deploy_from_url with
_diagnose_deb_failure() for targeted diagnostics
- install_packages_with_retry: on failure, check which packages are missing from
configured repos and name them with a distribution-specific hint
- upgrade_packages_with_retry: add hint about held-back packages / apt-cache policy
- setup_postgresql: when PGDG repo is unavailable for trixie/forky/sid, show which
distro PG version will be installed and warn that extension packages must match
- setup_deb822_repo: include GPG key URL and firewall hint in download failure message
- curl_download: add network/DNS hint to the failure message
- error_handler: add log-pattern analysis block after Node.js OOM detection that
scans the last 60 log lines for 5 common failure patterns and emits msg_warn hints:
* APT/dpkg dependency conflict (generic + PostgreSQL version mismatch)
* APT GPG/signature verification failure (sqv, KEYEXPIRED, NO_PUBKEY)
* Network/DNS failure (Could not resolve, Failed to fetch)
* APT lock held by another process
* Disk space exhaustion (ENOSPC)
* fix(tools): consolidate OS detection, add error hints, sort setup functions
- Replace all 13 manual /etc/os-release reads with get_os_info() across
prepare_repository_setup, setup_hwaccel, setup_java, setup_mysql,
setup_php, setup_postgresql, setup_clickhouse, install_packages_with_retry
- Add actionable Hint messages to 16 download/network failure paths:
adminer, composer, ffmpeg (x2), go, ghostscript, imagemagick, rbenv,
ruby-build, meilisearch-config, uv, yq, rust, apt-lock timeout,
mongodb GPG, php keyring
- Replace 6 silent 'apt install || true' with msg_warn for optional packages:
3x postgresql modules, ruby build deps, ssl-cert, docker-compose
- Sort all 'function setup_*' declarations into alphabetical order:
clickhouse moved to after adminer, docker moved to after composer,
meilisearch moved to after mariadb_db
* style(tools): unify all function declarations to name() { style
Remove 'function' keyword from 30 declarations to match the project convention
used in core.func, error_handler.func, and all other .func files (POSIX-compatible name() { syntax)
Instead of hard-failing when AVX is not present, detect whether the host
CPU supports AVX + AVX2 + MOVBE (x86-64-v3 microarchitecture level) and
select the appropriate upstream binary accordingly:
- iSponsorBlockTV-x86_64-linux → modern CPUs (AVX/AVX2/MOVBE)
- iSponsorBlockTV-x86_64-linux-v1 → any x86_64 CPU (fallback)
The same detection logic is applied in update_script() so updates
stay consistent with the initially installed binary type.
Fixes: https://github.com/community-scripts/ProxmoxVE/issues/14660
Upstream: dmunozv04/iSponsorBlockTV#463
* fix(reactive-resume): set correct WorkingDirectory for systemd service
* fix(reactive-resume): update WorkingDirectory in service for existing installs
* tools.func: replace max-time with speed-limit stall detection in curl_download
* Refactor curl_download function for improved readability and remove unnecessary whitespace
* Encode GitHub tag, refine pin logic, add Codeberg
Encode pinned GitHub tag slashes for API requests and avoid stripping a leading 'v' unless followed by a digit. Refactor pinned-version handling to match clean tags to raw tags, report missing pins, and set CHECK_UPDATE_RELEASE/messages appropriately. Add a new check_for_codeberg_release function to query Codeberg releases (uses jq, DNS check, handles legacy migration, pinned/latest comparison) so updates can be detected from Codeberg-hosted repos.
* Update tools.func
Two changes to resolve Puppeteer waitForFunction timeout (5000ms exceeded):
1. Use 127.0.0.1 instead of localhost for PRINTER_ENDPOINT to avoid
potential IPv6 resolution issues in LXC containers where 'localhost'
may resolve to ::1 while Chromium only listens on 127.0.0.1.
2. Add --no-zygote flag to the chromium-printer service. In LXC
containers the Zygote process (used by Chrome for process forking)
can fail silently, causing Puppeteer page rendering to hang until
the printer timeout is exceeded.
- Replace outdated 'pid /app/nginx' deletion with proper replacement
of 'pid /tmp/nginx/nginx.pid;' -> 'pid /run/nginx.pid;'
- Add sed to redirect error_log from /tmp/nginx/ to /var/log/nginx/
- Add sed to redirect access_log from /tmp/nginx/ to /var/log/nginx/
Fixes: nginx: open() '/tmp/nginx/nginx.pid' failed (2: No such file or directory)
When OpenResty is rebuilt via 'make install', it overwrites
/usr/local/openresty/nginx/conf/nginx.conf with the stock OpenResty
default config, dropping all NPM-specific include directives. This
causes port 81 to stop listening and conf.d configs to be ignored.
After the build, restore the NPM nginx.conf from the deployed source,
re-apply daemon/include-path patches, then apply user/pid fixes.
The heredoc used <<EOF (unquoted), causing the \ inside it
to be executed during installation. This embedded the entire cronmaster.sh
source (~250 lines) into the update script, which contained backtick-style
constructs that caused 'unexpected EOF while looking for matching backtick'
at line 44 when the update script was later run.
Use <<'EOF' so the literal \ text is written to the file.
* feat(update-apps): add var_continue_on_error and TERM=dumb fix
- Add var_continue_on_error=yes to skip failed containers instead
of aborting all remaining updates. Useful for cron/unattended runs
where one disabled or broken script should not stop others.
Containers with backup still attempt restore on failure regardless.
- Set TERM=dumb when running pct exec to prevent whiptail from
hanging when no TTY is available (e.g. cron jobs redirecting
stdout/stderr). This causes whiptail to fail-fast instead of
blocking indefinitely.
- Add var_continue_on_error to export_config_json, --help output,
and usage examples (cron-style invocation example added).
* feat(update-apps): add var_dry_run to check updates without applying
Adds dry-run mode (var_dry_run=yes) that reports available updates for
all selected containers without modifying anything:
- Extracts GitHub source repo from the ct script header (# Source:)
- Resolves the version file name from check_for_gh_release app arg
- Reads current installed version from ~/.appname inside the container
- Queries GitHub API /releases/latest for comparison
- Outputs color-coded status: up-to-date (green), update available (yellow),
or unknown (blue/yellow with reason)
Non-GitHub sources (Codeberg, custom URLs) are skipped with a notice.
Resource scaling is suppressed entirely during dry-run.
Example usage:
var_container=all_running var_skip_confirm=yes var_dry_run=yes \
bash -c "$(curl -fsSL .../update-apps.sh)"
* fix(update-apps): dry-run uses check_for_gh_release args, not Source header
The # Source: header can point to a different repo than what
check_for_gh_release actually queries (e.g. RustDesk uses
lejianwen fork, not official rustdesk repo).
Now parse both app name and source repo directly from the
check_for_gh_release call in the ct script:
check_for_gh_release "appname" "owner/repo"
Also fix $HOME/.appname path expansion in pct exec context.
* fix issue on clear()
* feat(update-apps): add no-op clear wrapper to PATH for update scripts
Co-authored-by: Copilot <copilot@github.com>
* feat(update-apps): enhance error handling for unattended mode in resource checks
Co-authored-by: Copilot <copilot@github.com>
* feat(update-apps): implement structured logging and summary report for updates
Co-authored-by: Copilot <copilot@github.com>
* fix log issue
Co-authored-by: Copilot <copilot@github.com>
* feat(update-apps): enhance dry-run functionality and logging for container updates
Co-authored-by: Copilot <copilot@github.com>
* feat(update-apps): add dry-run completion message for better user feedback
Co-authored-by: Copilot <copilot@github.com>
---------
Co-authored-by: Copilot <copilot@github.com>
ifconfig is not available on modern Debian systems (net-tools not
installed by default). Replace with hostname -I which is available
everywhere, with ip addr as fallback.
Fixes: #14257
The update script tried to cp into /opt/backup/storage/app/ before
the directory existed, causing a 'Not a directory' error when
/opt/backup was previously a file or the subdirs were missing.
Add mkdir -p to ensure the target directory exists.
Fixes: #14268
The check_for_gh_release function already prints its own 'No update
available' message when the app is up to date. The else block using
${RELEASE} was redundant and caused an empty version string to be shown
(e.g. 'already at v').
Fixes: #14267
* fix(dawarich): run db:migrate before assets:precompile
In Rails production, eager loading during assets:precompile can execute
DB queries. Dawarich 1.7.0 adds new tables (monthly digest email
preferences, S3 storage settings). Running precompile before migrate
causes 'Operation not permitted' / exit code 1 when those tables do
not exist yet.
Reordered to: db:migrate -> assets:precompile -> data:migrate,
which is the correct Rails deployment sequence.
Fixes#14048
* add otp key
Both update-lxcs.sh and update-apps.sh backgrounded pct shutdown and then
immediately called pct exec on the same container, causing 'Error: unexpected
status' which terminated the loop after the first container.
update-lxcs.sh: wrapped reboot-required and patchmon-agent checks in a
guard that only runs them when the container was already running (not
one that was started and is now being shut down).
update-apps.sh: moved pct set (resource reset) and the pct exec
reboot-required check to run before pct shutdown is issued.
Fixes#14027
Previously the update script only upgraded .NET when aspnetcore-runtime-8.0
or 9.0 was detected via is_package_installed. Containers where detection
failed would silently skip the upgrade block, leaving Technitium v15
(requires .NET 10) starting against .NET 8/9 and immediately failing.
Changed condition to: install .NET 10 unless it is already installed.
Old 8.0/9.0 packages are removed with || true to avoid errors on clean
installs.
Fixes#14045