]> git.rmz.io Git - dotfiles.git/commitdiff
bin: use own server for getting external ip
authorSamir Benmendil <me@rmz.io>
Sat, 14 Jan 2023 02:13:59 +0000 (02:13 +0000)
committerSamir Benmendil <me@rmz.io>
Sat, 14 Jan 2023 02:35:29 +0000 (02:35 +0000)
bin/whatsmyip

index 288e3b3f7b30f90516c611a120effa760644b390..c72ed041fdd2da204474d4d5c3e1397537ab29e1 100755 (executable)
@@ -1,9 +1,3 @@
 #!/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 -s ip.rmz.io