X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/9af266f744f734701079737a880fcfd0ced5e930..e8ae4a469b8b5db19a27a2bf71bb04142a68a6f0:/bin/whatsmyip?ds=sidebyside diff --git a/bin/whatsmyip b/bin/whatsmyip index 5f0479f..2d0d796 100755 --- a/bin/whatsmyip +++ b/bin/whatsmyip @@ -1,9 +1,8 @@ #!/bin/bash -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 +curl -4 -s ip.rmz.io && echo +ret4=$? +curl -6 -s ip.rmz.io && echo +ret6=$? + +exit $((ret4 && ret6))