fix:更新自动脚本终止操作
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user