File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,27 +4,6 @@ set -uo pipefail
44PARENT=" ${PARENT:? PARENT env var required} "
55SERVICE_NAME=" ${K_SERVICE:? K_SERVICE env var required} "
66
7- # =============================================
8- # Cleanup / Crash Handler
9- # =============================================
10- cleanup () {
11- EXIT_CODE=$?
12- if [ $EXIT_CODE -ne 0 ]; then
13- echo " =================================================================="
14- echo " ❌ SCRIPT CRASHED with exit code ${EXIT_CODE} "
15- echo " This usually means something went wrong during health checking"
16- echo " or during the delete operation."
17- echo " =================================================================="
18- else
19- echo " Script finished normally."
20- fi
21- }
22-
23- # Catch errors, interrupts, and normal exit
24- trap cleanup EXIT
25- trap ' echo "❌ Script interrupted (SIGINT)"; exit 1' INT
26- trap ' echo "❌ Script terminated (SIGTERM)"; exit 1' TERM
27-
287delete_service () {
298 echo " Flask appears down → Deleting service ${PARENT} /services/${SERVICE_NAME} "
309
You can’t perform that action at this time.
0 commit comments