From c67f7b90236eef1254f5bd5f69e359eeccb456d3 Mon Sep 17 00:00:00 2001 From: Daniel Hansson Date: Fri, 18 Aug 2023 12:10:55 +0200 Subject: [PATCH] check if it exists before removal Signed-off-by: Daniel Hansson --- apps/fulltextsearch.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/fulltextsearch.sh b/apps/fulltextsearch.sh index 6380b63c..b441b474 100644 --- a/apps/fulltextsearch.sh +++ b/apps/fulltextsearch.sh @@ -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"