Rm metrics docker even if not running (#4329)

This commit is contained in:
Jack May 2019-05-17 13:13:38 -07:00 committed by GitHub
parent 035a364122
commit 4ed0cded9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 6 deletions

View File

@ -6,15 +6,14 @@
cd "$(dirname "$0")"
for container in influxdb grafana; do
if [ "$(docker ps -q -f name=$container)" ]; then
if [ "$(docker ps -q -a -f name=$container)" ]; then
(
set +e
docker kill $container
docker rm $container
docker rm -f $container
exit 0
)
fi
done
done
echo Local metrics stopped
exit 0
echo Local metrics stopped
exit 0