Created
July 9, 2014 14:57
-
-
Save seqizz/e58e13ba906568d199a2 to your computer and use it in GitHub Desktop.
Check memcached
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PORT=$1 | |
if [[ `echo stats | nc -w 1 127.0.0.1 $PORT | grep STAT | head -1 | awk {'print $1'}` == "STAT" ]]; then | |
#Response OK | |
exit 0 | |
else | |
#No response - FAIL | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment