From 5718380e4b013a7a8d9cd40e6bb2c137cb99818c Mon Sep 17 00:00:00 2001 From: Topvennie Date: Tue, 11 Jun 2024 10:40:21 +0200 Subject: [PATCH] zess: Stop containers when interrupted --- dev.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dev.sh b/dev.sh index 2ece5db..0313559 100755 --- a/dev.sh +++ b/dev.sh @@ -1,5 +1,17 @@ #!/bin/sh +# Exit function + +ctrl_c() { + echo "-------------------------------------" + echo "Stopping all containers..." + echo "-------------------------------------" + docker-compose -f docker-compose.yml stop + exit 0 +} + +trap ctrl_c INT + # Parse input backend=false