diff options
-rwxr-xr-x | bin/checkip | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/bin/checkip b/bin/checkip index 0e9d345..831ded7 100755 --- a/bin/checkip +++ b/bin/checkip @@ -1,4 +1,6 @@ -#!/bin/bash -#echo "$(curl -s http://checkip.dyndns.org | sed 's/[a-zA-Z/<> :]//g') -#wget -qO- http://ipecho.net/plain ; echo -dig +short myip.opendns.com @resolver1.opendns.com +#!/usr/bin/env sh + +if [ -x /usr/bin/dig ]; then + dig +short myip.opendns.com @resolver1.opendns.com +fi +exit 0 |