stick to IPV4 for now
This commit is contained in:
@@ -14,7 +14,7 @@ function locals_only() {
|
||||
}
|
||||
function ifconfig_service() {
|
||||
which curl &>/dev/null && {
|
||||
curl ifconfig.co/json; exit $?
|
||||
curl -4 ifconfig.co/json; exit $?
|
||||
}
|
||||
which wget &>/dev/null && {
|
||||
wget -q -O - ifconfig.co/json; exit $?
|
||||
@@ -46,6 +46,9 @@ which dig &> /dev/null || {
|
||||
|
||||
|
||||
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
|
||||
output=$( dig +short -x "$IP" )
|
||||
|
||||
Reference in New Issue
Block a user