From d2c3010150049df973722792eaa2927fb589cc12 Mon Sep 17 00:00:00 2001 From: Joey Hafner Date: Thu, 18 Aug 2022 10:47:11 -0700 Subject: [PATCH] With subshell, all commands returned 1. Try without subshell --- server/scripts/nas_down.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/scripts/nas_down.sh b/server/scripts/nas_down.sh index b9d68e4..4de79b2 100755 --- a/server/scripts/nas_down.sh +++ b/server/scripts/nas_down.sh @@ -5,6 +5,6 @@ do CONTAINER_NAME=$(docker ps -aq --filter "id=$CONTAINER_ID" --format '{{.Names}}') # get the container's name CONTAINER_MOUNTS=$(docker inspect --format '{{range .Mounts}}{{println .Source}}{{end}}' $CONTAINER_ID) # print the container's volume mounts echo "======== CHECKING $CONTAINER_NAME ========" - $(echo "CONTAINER_MOUNTS" | grep /mnt/nas) + echo "CONTAINER_MOUNTS" | grep /mnt/nas echo $? done \ No newline at end of file