From 8938a19c1d161893b9e6ee8d9eb6e9451162d13c Mon Sep 17 00:00:00 2001 From: Joey Hafner Date: Thu, 18 Aug 2022 10:58:35 -0700 Subject: [PATCH] Closer --- server/scripts/nas_down.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/server/scripts/nas_down.sh b/server/scripts/nas_down.sh index f3bcc79..5150d7f 100755 --- a/server/scripts/nas_down.sh +++ b/server/scripts/nas_down.sh @@ -4,13 +4,12 @@ for CONTAINER_ID in $(docker ps -aq) # get list of all loaded containers (runnin 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 "======== CHECKING $CONTAINER_NAME ========" echo "$CONTAINER_MOUNTS" | grep -q /mnt/nas MATCH=$? - echo "$MATCH" if [ $MATCH == 0 ]; then - echo "NAS DEPENDENT" + echo "$CONTAINER_NAME IS NAS DEPENDENT" else - echo "NOT NAS DEPENDENT" + echo "$CONTAINER_NAME IS NOT NAS DEPENDENT" fi done \ No newline at end of file