This commit is contained in:
Your Name 2025-05-03 16:41:53 +12:00
parent 3a02933bab
commit f00523d149
2 changed files with 4 additions and 1 deletions

View File

@ -16,6 +16,9 @@ if ! docker volume ls | grep -q "^${VOLUME_NAME} "; then
docker volume create "${VOLUME_NAME}" docker volume create "${VOLUME_NAME}"
fi fi
if ! docker volume inspect "${VOLUME_NAME}" &>/dev/null; then
die "Failed to create volume ${VOLUME_NAME}"
fi
# Test Docker # Test Docker
_check_docker_installed || die "Docker test failed, aborting installation..." _check_docker_installed || die "Docker test failed, aborting installation..."

View File

@ -9,7 +9,7 @@ source "$(dirname "$0")/_common.sh"
check_required_env_vars "CONTAINER_NAME" "HOST_PORT" "VOLUME_NAME" check_required_env_vars "CONTAINER_NAME" "HOST_PORT" "VOLUME_NAME"
# check volume exists. # check volume exists.
if ! docker volume ls | grep -q "^${VOLUME_NAME} "; then if ! docker volume inspect "${VOLUME_NAME}" &>/dev/null; then
die "Docker volume ${VOLUME_NAME} does not exist" die "Docker volume ${VOLUME_NAME} does not exist"
fi fi