Docker: allow BTRFS or XFS or folder as vdisk location

This commit is contained in:
bergware
2020-07-10 15:53:22 +02:00
parent b22f348eb2
commit 1bde30569a
2 changed files with 28 additions and 22 deletions
@@ -1,10 +1,13 @@
#!/bin/bash
# delete the docker image file
if [ -f /boot/config/docker.cfg ]; then
# delete the docker image file or folder
if [[ -f /boot/config/docker.cfg ]]; then
. /boot/config/docker.cfg
if [ "${DOCKER_IMAGE_FILE}" != "" -a -f "${DOCKER_IMAGE_FILE}" ]; then
echo "Deleting ${DOCKER_IMAGE_FILE} ..."
rm "${DOCKER_IMAGE_FILE}"
if [[ -f $DOCKER_IMAGE_FILE ]]; then
echo "Deleting $DOCKER_IMAGE_FILE ..."
rm -f "$DOCKER_IMAGE_FILE"
elif [[ -d $DOCKER_IMAGE_FILE ]]; then
echo "Deleting $DOCKER_IMAGE_FILE ..."
rm -rf "$DOCKER_IMAGE_FILE"
fi
fi