check_remote_websites.sh: if HTTP statuscode is 401, assume the site is online
This commit is contained in:
parent
c0959fa621
commit
76297f70c1
@ -204,7 +204,10 @@ if [[ -n "$WEBSITES_TO_CHECK" ]] ; then
|
|||||||
while [[ $i -lt 3 ]] ; do
|
while [[ $i -lt 3 ]] ; do
|
||||||
response="$(curl --max-time $TIME_OUT --connect-timeout 30 \
|
response="$(curl --max-time $TIME_OUT --connect-timeout 30 \
|
||||||
-I -k -L --write-out %{http_code} --silent --output /dev/null $_site 2> ${LOCK_DIR}/err.msg)"
|
-I -k -L --write-out %{http_code} --silent --output /dev/null $_site 2> ${LOCK_DIR}/err.msg)"
|
||||||
if [[ "$response" -eq 200 ]]; then
|
|
||||||
|
# 200 - OK
|
||||||
|
# 401 - Unauthorized (response of roundcube webmailer (since version 1.4)
|
||||||
|
if [[ "$response" -eq 200 ]] || [[ "$response" -eq 401 ]]; then
|
||||||
echo_ok
|
echo_ok
|
||||||
_success=true
|
_success=true
|
||||||
break
|
break
|
||||||
|
Loading…
Reference in New Issue
Block a user