From 79f468ae1a6eae9733cdc3c90bb38d7ac86b6dd5 Mon Sep 17 00:00:00 2001 From: Joey Hafner Date: Thu, 18 Aug 2022 10:50:47 -0700 Subject: [PATCH] Evaluate command, don't run it --- homelab/server/scripts/nas_down.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homelab/server/scripts/nas_down.sh b/homelab/server/scripts/nas_down.sh index 6a6e23ed..da183833 100755 --- a/homelab/server/scripts/nas_down.sh +++ b/homelab/server/scripts/nas_down.sh @@ -6,7 +6,7 @@ do 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 - if $?; then + if [ $? ]; then echo "NAS DEPENDENT" else echo "NOT NAS DEPENDENT"