mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-02-18 00:17:43 +01:00
fix(build): SIGINT/SIGTERM traps now exit properly
- Add 'exit 130' after SIGINT trap handler - Add 'exit 143' after SIGTERM trap handler - Fixes issue where interrupted scripts stayed as 'Installing' in telemetry - Previously the traps only sent the update but didn't terminate the script
This commit is contained in:
@@ -5268,5 +5268,5 @@ if command -v pveversion >/dev/null 2>&1; then
|
||||
trap 'api_exit_script' EXIT
|
||||
fi
|
||||
trap 'ensure_log_on_host; post_update_to_api "failed" "$?"' ERR
|
||||
trap 'ensure_log_on_host; post_update_to_api "failed" "130"' SIGINT
|
||||
trap 'ensure_log_on_host; post_update_to_api "failed" "143"' SIGTERM
|
||||
trap 'ensure_log_on_host; post_update_to_api "failed" "130"; exit 130' SIGINT
|
||||
trap 'ensure_log_on_host; post_update_to_api "failed" "143"; exit 143' SIGTERM
|
||||
|
||||
Reference in New Issue
Block a user