not restart already restarting containers

fixes #53
This commit is contained in:
Hasnat
2021-02-04 11:18:24 +00:00
committed by GitHub
parent f25d3596a4
commit d5bd0c2d66
+2 -2
View File
@@ -44,7 +44,7 @@ get_container_info() {
else
label_filter=",\"label\":\[\"${AUTOHEAL_CONTAINER_LABEL}=true\"\]"
fi
url="${HTTP_ENDPOINT}/containers/json?filters=\{\"health\":\[\"unhealthy\"\]${label_filter}\}"
url="${HTTP_ENDPOINT}/containers/json?filters=\{\"status\":\[\"created\",\"running\",\"paused\",\"exited\",\"dead\"],\"health\":\[\"unhealthy\"\]${label_filter}\}"
docker_curl "$url"
}
@@ -99,4 +99,4 @@ if [ "$1" = "autoheal" ] && [ -e "$DOCKER_SOCK" ];then
else
exec "$@"
fi
fi