From 25c82363973cca9db0730fd5d0762eb0af5c7f2b Mon Sep 17 00:00:00 2001 From: "Brown, Joshua" Date: Mon, 19 Feb 2024 19:54:28 +0000 Subject: [PATCH] Switch to double == --- scripts/container_stop.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/container_stop.sh b/scripts/container_stop.sh index 28f03e2ba..6d0506de8 100755 --- a/scripts/container_stop.sh +++ b/scripts/container_stop.sh @@ -81,12 +81,12 @@ then fi done -elif [ "$local_NAME_FLAG_DETECTED" = "1" ] +elif [ "$local_NAME_FLAG_DETECTED" == "1" ] then for (( i=0; i<${#CONTAINER_IDS[@]}; i++)); do NAME="${CONTAINER_NAMES[$i]}" - if [ "$NAME" = "$local_CONTAINER_NAME" ] + if [ "$NAME" == "$local_CONTAINER_NAME" ] then echo "Stopping ${CONTAINER_IDS[$i]} ${CONTAINER_NAMES[$i]} ${CONTAINER_IMAGES[$i]}" docker container stop --time "$SLEEP_TIME" "${CONTAINER_IDS[$i]}" @@ -102,7 +102,7 @@ else fi -if [ ! "${#CONTAINER_IDS[@]}" = "0" ] +if [ ! "${#CONTAINER_IDS[@]}" == "0" ] then sleep "$SLEEP_TIME" fi @@ -112,24 +112,24 @@ CONTAINER_IDS=($(docker container ls --format "{{.ID}}")) CONTAINER_IMAGES=($(docker container ls --format "{{.Image}}")) CONTAINER_NAMES=($(docker container ls --format "{{.Names}}")) -if [ "$local_TAG_FLAG_DETECTED" = "1" ] +if [ "$local_TAG_FLAG_DETECTED" == "1" ] then for (( i=0; i<${#CONTAINER_IDS[@]}; i++)); do IMAGE="${CONTAINER_IMAGES[$i]}" - if [ "$IMAGE" = "local_CONTAINER_TAG" ] + if [ "$IMAGE" == "local_CONTAINER_TAG" ] then echo "ERROR still running ${CONTAINER_IDS[$i]} ${CONTAINER_NAMES[$i]} $IMAGE" exit 1 fi done -elif [ "$local_NAME_FLAG_DETECTED" = "1" ] +elif [ "$local_NAME_FLAG_DETECTED" == "1" ] then for (( i=0; i<${#CONTAINER_IDS[@]}; i++)); do NAME="${CONTAINER_NAMES[$i]}" - if [ "$NAME" = "local_CONTAINER_NAME" ] + if [ "$NAME" == "local_CONTAINER_NAME" ] then echo "ERROR still running ${CONTAINER_IDS[$i]} ${CONTAINER_NAMES[$i]} ${CONTAINER_IMAGES[$i]}" exit 1 @@ -138,7 +138,7 @@ then else - if [ ! "${#CONTAINER_IDS[@]}" = "0" ] + if [ ! "${#CONTAINER_IDS[@]}" == "0" ] then docker container ls exit 1