From 5cbbdbf1219254ca68b11f32ea28146a50e377f5 Mon Sep 17 00:00:00 2001 From: Stephan Barth Date: Mon, 21 Oct 2024 17:37:23 +0200 Subject: [PATCH 1/3] build(utils/watchcontainerrun.sh): Enhanced messages on container stop. --- utils/watchcontainerrun.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/utils/watchcontainerrun.sh b/utils/watchcontainerrun.sh index 6bd720090..97aa18355 100755 --- a/utils/watchcontainerrun.sh +++ b/utils/watchcontainerrun.sh @@ -9,7 +9,7 @@ CLEANUPSCRIPT="$4" TRIES=1 -while ! grep -q 'CONTAINER_ID=' "$FILENAME" > /dev/null 2&>/dev/null ; do +while ! grep -q 'CONTAINER_ID=' "$FILENAME" > /dev/null 2>/dev/null ; do sleep 1 TRIES=$((1+$TRIES)) if [ "$TRIES" -ge 20 ] ; then @@ -32,9 +32,11 @@ while [ -e "$FILENAME" ] ; do rm "$FILENAME" exit fi - inotifywait -e ATTRIB -t 10 "$FILENAME" > /dev/null 2&>/dev/null + inotifywait -e ATTRIB -t 10 "$FILENAME" > /dev/null 2>/dev/null done +echo "containerfile was removed; initiating stop on container with id:" +echo -n " " $RUNNER stop "$CONTAINER_ID" $CLEANUPSCRIPT From 05c255a62f079fc1bf69498552d58d6d2ef8274d Mon Sep 17 00:00:00 2001 From: Stephan Barth Date: Mon, 21 Oct 2024 17:47:51 +0200 Subject: [PATCH 2/3] build(utils/watchcontainerrun.sh): Further enhanced messages on container stop. --- utils/watchcontainerrun.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/watchcontainerrun.sh b/utils/watchcontainerrun.sh index 97aa18355..36f1dbae9 100755 --- a/utils/watchcontainerrun.sh +++ b/utils/watchcontainerrun.sh @@ -35,7 +35,7 @@ while [ -e "$FILENAME" ] ; do inotifywait -e ATTRIB -t 10 "$FILENAME" > /dev/null 2>/dev/null done -echo "containerfile was removed; initiating stop on container with id:" +echo "containerfile '$FILENAME' was removed; initiating stop on container with id:" echo -n " " $RUNNER stop "$CONTAINER_ID" From 67395c4e7831710fa4f3c41ffe98ef12e4afe4a4 Mon Sep 17 00:00:00 2001 From: Stephan Barth Date: Mon, 21 Oct 2024 18:44:28 +0200 Subject: [PATCH 3/3] build(utils/watchcontainerrun.sh): Less output on container stop. --- utils/watchcontainerrun.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/utils/watchcontainerrun.sh b/utils/watchcontainerrun.sh index 36f1dbae9..eb2073024 100755 --- a/utils/watchcontainerrun.sh +++ b/utils/watchcontainerrun.sh @@ -35,9 +35,7 @@ while [ -e "$FILENAME" ] ; do inotifywait -e ATTRIB -t 10 "$FILENAME" > /dev/null 2>/dev/null done -echo "containerfile '$FILENAME' was removed; initiating stop on container with id:" -echo -n " " -$RUNNER stop "$CONTAINER_ID" +$RUNNER stop "$CONTAINER_ID" > /dev/null 2>/dev/null $CLEANUPSCRIPT