Fix "nohealthlocal: command not found" error

This commit is contained in:
Razvan Stoica 2021-03-10 14:58:58 +02:00
parent 2132b03b92
commit 9ae0d92b5d

View file

@ -1055,17 +1055,17 @@ check_5_26() {
totalChecks=$((totalChecks + 1)) totalChecks=$((totalChecks + 1))
fail=0 fail=0
nohealthlocal check="" nohealthcheck_containers=""
for c in $containers; do for c in $containers; do
if ! docker inspect --format '{{ .Id }}: Health={{ .State.Health.Status }}' "$c" 2>/dev/null 1>&2; then if ! docker inspect --format '{{ .Id }}: Health={{ .State.Health.Status }}' "$c" 2>/dev/null 1>&2; then
if [ $fail -eq 0 ]; then if [ $fail -eq 0 ]; then
warn "$check" warn "$check"
warn " * Health check not set: $c" warn " * Health check not set: $c"
nohealthlocal check="$nohealthcheck_containers $c" nohealthcheck_containers="$nohealthcheck_containers $c"
fail=1 fail=1
else else
warn " * Health check not set: $c" warn " * Health check not set: $c"
nohealthlocal check="$nohealthcheck_containers $c" nohealthcheck_containers="$nohealthcheck_containers $c"
fi fi
fi fi
done done