From 2487f0c20e8851c0b92b6fbb848ffc6152ad3da2 Mon Sep 17 00:00:00 2001 From: Alexander Hosking Date: Fri, 29 Sep 2023 11:19:07 -0400 Subject: [PATCH] Add Logic to run existing influx --- docker_run.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docker_run.sh b/docker_run.sh index 16bf524..ff19606 100755 --- a/docker_run.sh +++ b/docker_run.sh @@ -1,3 +1,8 @@ -docker run --name influxdb -p 8086:8086 \ +if [ $( docker ps -a | grep influxdb | wc -l ) -gt 0 ]; then + docker start influxdb +else + docker run --name influxdb -p 8086:8086 \ -v $PWD:/var/lib/influxdb2 \ influxdb:2.0 +fi +