core: support optional POST_INSTALL_SCRIPT (var_post_install_script) hook #14160
Draft
core: support optional POST_INSTALL_SCRIPT (var_post_install_script) hook #14160
Conversation
f8a8ad8 to
3a1c02d
Compare
…figurable via default.vars/app.vars or new advanced-settings step (path on Proxmox host); runs in description() with APP/CTID/IP env vars.
3a1c02d to
53fcf17
Compare
…, logging & whiptail error feedback
- 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.
…ipts 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
✍️ Description
work in progress
🔗 Related Issue
Fixes #14112
✅ Prerequisites (X in brackets)
🛠️ Type of Change (X in brackets)
README,AppName.md,CONTRIBUTING.md, or other docs.