Just found out herestrings aren't POSIX. Removed.

master
Aaron Johnon 4 years ago
parent 101274c56b
commit bfb91dee36

@ -46,7 +46,7 @@ send_message() {
} }
get_http_code() { get_http_code() {
if host $(awk '{gsub("https?://|/.*","")}1' <<< $1) &>/dev/null; then if host $(printf '%s\n' $1 | awk '{gsub("https?://|/.*","")}1') &>/dev/null; then
curl -sILk --max-time $TIME $1 | grep HTTP | tail -n 1 | grep -Eo '[0-9]{3}' || printf '%s\n' 999 curl -sILk --max-time $TIME $1 | grep HTTP | tail -n 1 | grep -Eo '[0-9]{3}' || printf '%s\n' 999
else else
printf '%s\n' 000 printf '%s\n' 000

Loading…
Cancel
Save