Add Logic to run existing influx

This commit is contained in:
Alexander Hosking 2023-09-29 11:19:07 -04:00
parent 7531c9cc7c
commit 2487f0c20e

View File

@ -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 \ -v $PWD:/var/lib/influxdb2 \
influxdb:2.0 influxdb:2.0
fi