Grep the variable, not the actual paths
This commit is contained in:
parent
8c4e5d733e
commit
511a12333f
@ -5,7 +5,7 @@ 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 ========"
|
||||
if grep -q /mnt/nas "$CONTAINER_MOUNTS"
|
||||
if grep -q /mnt/nas $(echo "$CONTAINER_MOUNTS")
|
||||
then
|
||||
echo "IS NAS DEPENDENT"
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user