X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/caa72b3a3079cb74996f1c8b0c9fc36754087c1e..dd31c0dded7f7bcb22e6bc01b4c4d78f1e5d8f34:/bin/whatsmyip?ds=inline diff --git a/bin/whatsmyip b/bin/whatsmyip index ed417b2..2e6c6c3 100755 --- a/bin/whatsmyip +++ b/bin/whatsmyip @@ -1,2 +1,7 @@ #!/bin/bash -wget http://automation.whatismyip.com/n09230945.asp -qO - + +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