From 38b2357e65b4591c3986da7e8f4328ab8a0d9bfa Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 24 Jul 2019 09:53:24 +0200 Subject: [PATCH] add error detection to healthcheck --- overlay/usr/local/bin/healthcheck.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/overlay/usr/local/bin/healthcheck.sh b/overlay/usr/local/bin/healthcheck.sh index 588bc8b..46787f6 100755 --- a/overlay/usr/local/bin/healthcheck.sh +++ b/overlay/usr/local/bin/healthcheck.sh @@ -6,4 +6,9 @@ URL=http://localhost wget --quiet --tries=1 --spider ${URL} [ $? -ne 0 ] && exit 1 +CONTENT=$(wget --quiet -O - ${URL}) +case "$CONTENT" in + *"Internal Error"*) exit 1 ;; +esac + exit 0