stick to IPV4 for now

This commit is contained in:
Ville Rantanen
2020-10-28 19:48:47 +02:00
parent d2347d8cfb
commit 2708baee16

View File

@@ -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" )