]> git.rmz.io Git - dotfiles.git/blobdiff - bin/whatsmyip
xdg: add user-dirs.dirs
[dotfiles.git] / bin / whatsmyip
index ed417b23f8c4af5e4fe907b5703a40b80de40e62..2e6c6c39d4b3ff258d6e931b13ce6efc1b192e61 100755 (executable)
@@ -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