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