With subshell, all commands returned 1. Try without subshell
This commit is contained in:
parent
d36d86ee89
commit
d2c3010150
@ -5,6 +5,6 @@ do
|
|||||||
CONTAINER_NAME=$(docker ps -aq --filter "id=$CONTAINER_ID" --format '{{.Names}}') # get the container's name
|
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
|
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 /mnt/nas)
|
echo "CONTAINER_MOUNTS" | grep /mnt/nas
|
||||||
echo $?
|
echo $?
|
||||||
done
|
done
|
Loading…
Reference in New Issue
Block a user