added check of DOCKER_VOLUME variable

This commit is contained in:
André Bauer 2020-04-14 16:32:36 +02:00 committed by GitHub
parent c5751c06f7
commit cdbb3dce14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,7 +50,8 @@ Do the following to empty the ES docker volume:
``` ```
docker-compose stop docker-compose stop
rm -r $(docker volume inspect zammaddockercompose_elasticsearch-data | grep Mountpoint | sed -e 's#.*": "##g' -e 's#",##')/* set -o pipefail DOCKER_VOLUME="$(docker volume inspect zammaddockercompose_elasticsearch-data | grep Mountpoint | sed -e 's#.*": "##g' -e 's#",##')/*"
echo "${DOCKER_VOLUME}" #check this is a valid docker volume path! if not do not proceed or you might loose data!
docker-compose start docker-compose start
``` ```