]> git.rmz.io Git - dotfiles.git/commitdiff
whatsmyip: use drill if available
authorSamir Benmendil <me@rmz.io>
Wed, 31 Oct 2018 00:02:29 +0000 (00:02 +0000)
committerSamir Benmendil <me@rmz.io>
Wed, 31 Oct 2018 00:02:29 +0000 (00:02 +0000)
bin/whatsmyip

index 2e6c6c39d4b3ff258d6e931b13ce6efc1b192e61..5f0479f780c3d902700f105da322bc253a8c1344 100755 (executable)
@@ -1,5 +1,7 @@
 #!/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