update site_200

This commit is contained in:
Daniel Hansson 2020-08-06 11:52:15 +02:00 committed by GitHub
parent 057bdb4aa8
commit b0f99cf6e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

3
lib.sh
View File

@ -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