- vm-core.func: add rm -f WORK_FILE in all recovery paths (RETRY,
SKIP_CUSTOMIZE, RETRY_SETTINGS, NEW_VMID) to prevent multi-GB temp
file leaks in /tmp on failed retry
- debian-13-vm.sh: same WORK_FILE cleanup in inline recovery path
- debian-13-vm.sh: fix misleading 'will configure on first boot' msg
when skipping virt-customize (no first-boot mechanism exists)
Phase 4: haos-vm.sh
- Inline recovery in error_handler with RETRY_DOWNLOAD option (cache clearing)
- VM creation wrapped in create_vm() for bounded recursive retry
- Supports max 2 retries with whiptail recovery menu
Phase 5: debian-13-vm.sh, ubuntu2204/2404/2504-vm.sh
- Inline recovery with RETRY/KEEP/ABORT options
- debian-13-vm.sh: SKIP_CUSTOMIZE option to bypass virt-customize failures
- All scripts wrapped in create_vm() with phase flag pattern
Phase 6: openwrt-vm.sh
- Limited recovery for download/import phase
- Preserves set -Eeo pipefail, disables pipefail during recovery menu
- sendkey/network config phase included in create_vm but not specifically retryable
Architecture: Inline recovery pattern (no vm-core.func dependency)
- Consistent with docker-vm.sh's recursive retry via error_handler
- Bounded by VM_MAX_RETRIES=2
- ERR trap disabled during recovery menu, restored before retry
* Ensure API update is sent on script exit
Add exit-time telemetry handling across scripts to avoid orphaned "installing" records. Introduce local exit_code capture in api_exit_script and cleanup handlers and, when POST_TO_API_DONE is true but POST_UPDATE_DONE is not, post a final status (marking failures on non-zero exit codes, or marking done/failed in VM cleanups based on exit code). Changes touch misc/build.func, misc/vm-core.func and various vm/*-vm.sh cleanup functions to reliably send post_update_to_api on normal or early exits.
* Update api.func
* fix(telemetry): add missing exit codes to explain_exit_code()
- Add curl error codes: 4, 5, 8, 23, 25, 30, 56, 78
- Add code 10: Docker/privileged mode required (used in ~15 scripts)
- Add code 75: Temporary failure (retry later)
- Add BSD sysexits.h codes: 64-77
- Sync error_handler.func fallback with canonical api.func
Replace the final '| head -1' in both install and ct scripts with 'awk 'NR==1'' to pick the first matching Teamspeak release line. In the ct script the previous temporary toggling of pipefail was also removed, simplifying the command. This improves compatibility and reduces reliance on an extra utility in minimal environments.
- Remove legacy error_handler(), on_exit(), on_interrupt(), on_terminate() and set/trap definitions from alpine-install.func (already provided by error_handler.func which is sourced on line 10)
- The local error_handler() expected positional args as required, but catch_errors() sets trap as 'error_handler' (without args), causing unbound variable error with set -u (nounset)
- error_handler.func uses default values which is set -u safe
- Also align legacy trap in install.func network_check() to standard format
Fixes#11929
Update ct/jellyseerr.sh and ct/overseerr.sh to switch the container update handler to the Seerr script. The here-doc now uses a single-quoted EOF to avoid shell expansion and includes an explicit shebang for the generated /usr/bin/update. Instead of auto-executing the new update script, the code now informs the user to run 'update' again and exits (overseerr exits with 0). Also includes minor whitespace cleanup (removed trailing spaces on cd lines). This prevents unexpected immediate execution and ensures the generated script runs with the intended shell.