stick to IPV4 for now
This commit is contained in:
@@ -14,7 +14,7 @@ function locals_only() {
|
|||||||
}
|
}
|
||||||
function ifconfig_service() {
|
function ifconfig_service() {
|
||||||
which curl &>/dev/null && {
|
which curl &>/dev/null && {
|
||||||
curl ifconfig.co/json; exit $?
|
curl -4 ifconfig.co/json; exit $?
|
||||||
}
|
}
|
||||||
which wget &>/dev/null && {
|
which wget &>/dev/null && {
|
||||||
wget -q -O - ifconfig.co/json; exit $?
|
wget -q -O - ifconfig.co/json; exit $?
|
||||||
@@ -46,6 +46,9 @@ which dig &> /dev/null || {
|
|||||||
|
|
||||||
|
|
||||||
IP=$( dig +short myip.opendns.com @resolver1.opendns.com )
|
IP=$( dig +short myip.opendns.com @resolver1.opendns.com )
|
||||||
|
if [[ -z "$IP" ]]; then
|
||||||
|
IP=$( curl -s -4 ifconfig.co/ip )
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ "$NAME" -eq 1 ]]; then
|
if [[ "$NAME" -eq 1 ]]; then
|
||||||
output=$( dig +short -x "$IP" )
|
output=$( dig +short -x "$IP" )
|
||||||
|
|||||||
Reference in New Issue
Block a user