Am I Online?
uriel1998 Nov 25th, 2011 116 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- # simple wrapper to test and see if you're online so your scripts don't waste your time (or clog your log).
- # I test this way because of hotspots that let you *connect* - but you aren't online.
- ext_ip=$(/usr/bin/wget -q -O - checkip.dyndns.org | /bin/sed -e 's/[^[:digit:]|.]//g')
- if [ $len_ext_ip -lt 16 ]; then
- if [ $len_ext_ip -gt 7 ]; then
- exec $cmd
- #echo "$cmd"
- #echo "$ext_ip"
RAW Paste Data