Skip to content

Instantly share code, notes, and snippets.

@hydra35
Created May 27, 2013 11:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hydra35/5656584 to your computer and use it in GitHub Desktop.
Save hydra35/5656584 to your computer and use it in GitHub Desktop.
#!/bin/bash
host=$1
port=$2
rc=$(curl -I http://$host:$port/stats 2>/dev/null | grep -c 'HTTP/1.1 200 OK')
if [[ $rc -eq 1 ]]; then
exit 0
else
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment