From 6391541d783e2551a23e13fcc12d8cccfdc763d9 Mon Sep 17 00:00:00 2001 From: Zach van Rijn Date: Wed, 6 Oct 2021 12:00:18 -0500 Subject: scripts/healthchecks: detect HTML documents --- scripts/healthchecks | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'scripts') diff --git a/scripts/healthchecks b/scripts/healthchecks index 9742ec3fd..3e8773566 100755 --- a/scripts/healthchecks +++ b/scripts/healthchecks @@ -61,6 +61,12 @@ try_down () curl --connect-timeout 10 -sLo "${TEMP}/${name}" "${down}" || okay=${?}; + ## + # The return code may be wrong. Look for HTML documents. + # + file -i "${TEMP}/${name}" | grep 1>/dev/null text/html && okay=-1; + + ## # Record any possible failure if new, otherwise delete it. # -- cgit v1.2.3-60-g2f50