Commit Graph

8 Commits

Author SHA1 Message Date
CanbiZ (MickLesk)
441158b195 Standardize mirror messaging; simplify apt update
Replace inconsistent msg_info calls with msg_warn for mirror-list warnings and msg_custom for "Attempting mirror" lines to unify output formatting in misc/build.func and misc/install.func. Simplify tools/pve/update-lxcs-cron.sh by removing the long mirror-probing block and using a straightforward apt-get update + noninteractive dist-upgrade (and cleanup of EXTERNALLY-MANAGED) in containers to reduce complexity and improve maintainability.
2026-03-26 16:32:25 +01:00
CanbiZ (MickLesk)
1f2410e997 Add apt mirror fallback for Debian/Ubuntu
Enhance apt-get update handling for Debian/Ubuntu/Devuan containers by adding regional mirror lists and a fallback routine. The script now detects container timezone to prefer regional mirrors, builds a randomized candidate list, probes each mirror (timeout on TCP:80), rewrites /etc/apt/* sources to use a working mirror, and retries apt-get update until success. Keeps the existing non-interactive dist-upgrade and cleans up apt lists as before. This improves reliability of updates inside LXC containers when default mirrors are unreachable or misbehaving.
2026-03-26 15:23:50 +01:00
CanbiZ (MickLesk)
6d213d511f Simplify APT retry logic and add insecure fallback
Replace the previous multi-step APT retry sequence (mirror swaps, sleeps, multiple retries) with a simpler fallback: on apt-get update failure disable Acquire::By-Hash, enable Acquire::AllowInsecureRepositories and attempt updates/installs using --allow-insecure-repositories/--allow-unauthenticated where needed. Restore secure settings and refresh lists afterwards, and preserve/propagate the original command exit status. Apply the same simplification in misc/build.func, misc/install.func and the Proxmox LXC cron updater (tools/pve/update-lxcs-cron.sh) to handle Debian repo desyncs more reliably and reduce complex retry logic.
2026-03-26 14:02:09 +01:00
CanbiZ (MickLesk)
74a3be318f Update update-lxcs-cron.sh 2026-03-26 13:49:22 +01:00
CanbiZ (MickLesk)
d836402348 Add status/run/rotate options & improve updater
tools/pve/cron-update-lxcs.sh: add show_status, run_now and rotate_log functions; expose new menu options (Status, Run, Rotate) and enlarge menu. Consolidate license line formatting.

tools/pve/update-lxcs-cron.sh: tighten variable scoping, improve ostype detection and logging, add fallback for hostname, handle unknown OS types, harden apt workflow (retry with By-Hash workaround and refresh lists), skip template containers correctly, add error reporting on container updates, and use a timed shutdown. Update author/license header.

Overall: adds manual control and status/log rotation to the cron manager and makes the container updater more robust and safer for Debian/Ubuntu-based containers.
2026-03-26 13:45:02 +01:00
CanbiZ (MickLesk)
1cbc30e578 Switch repo URLs to raw.githubusercontent.com
Update script and license links to use GitHub raw URLs. Replace git.community-scripts.org references with https://raw.githubusercontent.com/... for script fetching and https://github.com/... for the LICENSE link in tools/pve/cron-update-lxcs.sh and tools/pve/update-lxcs-cron.sh so the curl examples and REPO_URL point to GitHub-hosted raw content.
2026-03-12 11:35:21 +01:00
CanbiZ (MickLesk)
73b8a02a8c Update update-lxcs-cron.sh 2026-03-12 11:31:59 +01:00
CanbiZ (MickLesk)
a6e0de632f cron 2026-03-12 11:27:07 +01:00