#!/bin/bash
-wget http://automation.whatismyip.com/n09230945.asp -qO -
+
+if hash drill 2>/dev/null; then
+ drill +short myip.opendns.com @resolver1.opendns.com
+if hash dig 2>/dev/null; then
+ dig +short myip.opendns.com @resolver1.opendns.com
+elif hash curl 2>/dev/null; then
+ curl -s ifconfig.me/ip
+fi