]> git.rmz.io Git - dotfiles.git/blobdiff - bin/whatsmyip
lazyvim: absorb snacks notifier
[dotfiles.git] / bin / whatsmyip
index 288e3b3f7b30f90516c611a120effa760644b390..2d0d796a2766df1622c4831b3e186c5214622c7a 100755 (executable)
@@ -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))