use "mountpoint" to check if we have the user data mounted

This commit is contained in:
Johannes Zellner
2017-04-05 14:30:32 +02:00
parent 11d12c591e
commit 51d5b96fa1
+1 -1
View File
@@ -102,7 +102,7 @@ mkdir -p "${BOX_DATA_DIR}/certs"
mkdir -p "${BOX_DATA_DIR}/acme" # acme keys
echo "==> Check for old btrfs volumes"
if df "${OLD_DATA_DIR}"; then
if mountpoint -q "${OLD_DATA_DIR}"; then
echo "==> Cleanup btrfs volumes"
# First stop all container to be able to unmount
docker ps -q | xargs docker stop