Skip to content

Instantly share code, notes, and snippets.

@xhat
Last active August 29, 2015 14:18
Show Gist options
  • Save xhat/05ff4d2427d3d2263af9 to your computer and use it in GitHub Desktop.
Save xhat/05ff4d2427d3d2263af9 to your computer and use it in GitHub Desktop.
#/bin/bash
URL="http://192.168.5.100/xxx.php"
check() {
RESULT=$(curl -s $URL)
echo $RESULT
if [ "$RESULT" -eq "1111" ] ; then
echo "again"
sleep 1
check
elif [ "$RESULT" -eq "0000" ] ; then
echo "exit"
exit 0
else
echo "error"
fi
}
check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment