From b0f99cf6e2e23015f543b892a73ecbebe022975d Mon Sep 17 00:00:00 2001 From: Daniel Hansson Date: Thu, 6 Aug 2020 11:52:15 +0200 Subject: [PATCH] update site_200 --- lib.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib.sh b/lib.sh index bbf151db..9b08f976 100644 --- a/lib.sh +++ b/lib.sh @@ -242,7 +242,8 @@ done # Checks if site is reachable with a HTTP 200 status site_200() { print_text_in_color "$ICyan" "Checking connection..." - CURL_STATUS="$(curl -sSL -w "%{http_code}" "${1}" | tail -1)" + # CURL_STATUS="$(curl -sSL -w "%{http_code}" "${1}" | tail -1)" + CURL_STATUS="$(curl -LI "${1}" -o /dev/null -w '%{http_code}\n' -s)" if [[ "$CURL_STATUS" = "200" ]] then return 0