X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/5523afa0e5f07667086270ac2e94d825582d1a7d..11a0c9f9676ea9f8f0e8768b3e6cc569786320c4:/bin/whatsmyip diff --git a/bin/whatsmyip b/bin/whatsmyip index 2e6c6c3..288e3b3 100755 --- a/bin/whatsmyip +++ b/bin/whatsmyip @@ -1,6 +1,8 @@ #!/bin/bash -if hash dig 2>/dev/null; then +if hash drill 2>/dev/null; then + drill myip.opendns.com @resolver1.opendns.com | grep "^myip." | cut -f5 +elif 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