Skip to content

Instantly share code, notes, and snippets.

@amsterdatech
Forked from henriquemenezes/http-ping.sh
Created February 18, 2020 04:21
Show Gist options
  • Save amsterdatech/72be66e70221cdb3af41655ba999b7c4 to your computer and use it in GitHub Desktop.
Save amsterdatech/72be66e70221cdb3af41655ba999b7c4 to your computer and use it in GitHub Desktop.
HTTP Ping
function http-ping {
SLEEP=${2:-5}
while true; do echo "$(date +'%Y-%m-%d %H:%M:%S') - GET $1 - $(curl -sL -w "%{http_code}" -o /dev/null $1)"; sleep $SLEEP; done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment