Skip to content

Commit fe668ff

Browse files
committed
simpler
1 parent fef4bd7 commit fe668ff

1 file changed

Lines changed: 0 additions & 21 deletions

File tree

cleanup.bash

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,6 @@ set -uo pipefail
44
PARENT="${PARENT:?PARENT env var required}"
55
SERVICE_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-
287
delete_service() {
298
echo "Flask appears down → Deleting service ${PARENT}/services/${SERVICE_NAME}"
309

0 commit comments

Comments
 (0)