check if it exists before removal

Signed-off-by: Daniel Hansson <mailto@danielhansson.nu>
This commit is contained in:
Daniel Hansson 2023-08-18 12:10:55 +02:00 committed by GitHub
parent e04636765e
commit c67f7b9023
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,7 +52,10 @@ else
done
# Removal Elastichsearch Docker image
docker_prune_this "docker.elastic.co/elasticsearch/elasticsearch"
docker network rm fulltextsearch_es01-network
if docker network ls | grep fulltextsearch_es01-network
then
docker network rm fulltextsearch_es01-network
fi
rm -rf "$FULLTEXTSEARCH_DIR"
# Show successful uninstall if applicable
removal_popup "$SCRIPT_NAME"