fix:更新自动脚本终止操作

This commit is contained in:
nnbcccscdscdsc
2026-03-24 16:20:34 +08:00
parent 1e64c1b88e
commit 0b84fbdd63

View File

@@ -34,7 +34,21 @@ cleanup() {
cleanup_temp_file "$chart_tmp"
}
trap cleanup EXIT INT TERM
handle_interrupt() {
log "received interrupt signal, stopping refresh loop"
cleanup
exit 130
}
handle_terminate() {
log "received terminate signal, stopping refresh loop"
cleanup
exit 143
}
trap cleanup EXIT
trap handle_interrupt INT
trap handle_terminate TERM
cd "$repo_dir" || exit 1