mirror of
https://github.com/rmcrackan/Libation.git
synced 2026-11-28 17:28:36 +01:00
liberate.sh runs as PID 1, and bash as PID 1 ignores SIGTERM unless it is trapped, so `docker stop` always waited out its timeout and then SIGKILLed the container (exit 137). Trap TERM and INT. Run LibationCli and the sleep between runs in the background and wait on them, so the trap fires at once instead of after the child exits. On a signal, send SIGTERM to a running child and wait for it, so LibationCli can shut down cleanly before the script exits with 143 (TERM) or 130 (INT). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>