Merge pull request #54 from hasnat/patch-4

not restart already restarting containers
This commit is contained in:
will Farrell
2021-02-05 21:15:10 -07:00
committed by GitHub
+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