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 +