Adds tools/pve/post-install-hook-examples.sh — a single, well-commented
file that demonstrates how to use the new var_post_install hook.
It is NOT meant to be executed directly. Each example sits between clear
BEGIN/END markers; users copy the block they want into their own .sh on
the Proxmox host and point var_post_install at it.
Examples:
1. minimal-logger.sh — append every new LXC to a CSV log
2. discord-gotify-notify.sh — Discord embed + Gotify push
3. auto-pool-tags-backup.sh — pool, tags, pi-hole DNS, vzdump
4. inject-ssh-and-monitoring.sh— admin SSH key, Beszel agent, Uptime-Kuma
5. per-app-router.sh — dispatcher with per-NSAPP behavior
- New step 28 in advanced_settings(): inputbox for the optional host-side
post-install script path. Validates: must be absolute, no shell
metacharacters; warns (yes/no) if file does not yet exist on host.
- Verbose+Confirm becomes step 29; confirm summary now includes a
warning that the hook runs as root on the Proxmox HOST, not in the LXC.
- Execution block:
* Captures hook stdout/stderr to /var/log/community-scripts/post-install-<CTID>.log
* Uses explicit $? capture (was relying on $? after if-test).
* On failure or missing file: shows whiptail msgbox so the user
cannot miss it scrolling past the post-create output.
* Tails the last 15 log lines into the failure popup.
* 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