|
|
@ -58,7 +58,7 @@ MSG='HTTP/S Problems Found:'
|
|
|
|
FAILURE=false
|
|
|
|
FAILURE=false
|
|
|
|
|
|
|
|
|
|
|
|
# Check HTTP codes
|
|
|
|
# Check HTTP codes
|
|
|
|
for site in $(< $CHKLIST); do
|
|
|
|
for site in $(grep -v "^#\|^$" $CHKLIST); do
|
|
|
|
respcode=$(get_http_code $site)
|
|
|
|
respcode=$(get_http_code $site)
|
|
|
|
case $respcode in
|
|
|
|
case $respcode in
|
|
|
|
000)
|
|
|
|
000)
|
|
|
@ -81,7 +81,9 @@ for site in $(< $CHKLIST); do
|
|
|
|
done || exit 2
|
|
|
|
done || exit 2
|
|
|
|
|
|
|
|
|
|
|
|
# Send compiled message if any problems were found
|
|
|
|
# Send compiled message if any problems were found
|
|
|
|
send_message "$MSG" && printf '%s\n' "Problems found. Message sent via Telegram bot" >&2 || printf '%s\n' "Problems found. Message sending has failed"
|
|
|
|
if [ "$FAILURE" = "true" ]; then
|
|
|
|
|
|
|
|
send_message "$MSG" && printf '%s\n' "Problems found. Message sent via Telegram bot" >&2 || printf '%s\n' "Problems found. Message sending has failed"
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
exit 0
|
|
|
|
exit 0
|
|
|
|
|
|
|
|
|
|
|
|