Merge pull request #114 from Vigilans/vigilans/fix-busybox-wget
Fix no "-4" and "-6" parameter when using busybox wget
This commit is contained in:
1 file changed
+6
-2
@@ -90,8 +90,10 @@ arWanIp6() {
|
|||||||
if [ -z "$hostIp" ]; then
|
if [ -z "$hostIp" ]; then
|
||||||
if type curl >/dev/null 2>&1; then
|
if type curl >/dev/null 2>&1; then
|
||||||
hostIp=$(curl -6 -s $arIp6QueryUrl)
|
hostIp=$(curl -6 -s $arIp6QueryUrl)
|
||||||
else
|
elif ! wget --help 2>&1 | grep -qs BusyBox; then
|
||||||
hostIp=$(wget -6 -q -O- $arIp6QueryUrl)
|
hostIp=$(wget -6 -q -O- $arIp6QueryUrl)
|
||||||
|
else
|
||||||
|
hostIp=$(wget -q -O- $arIp6QueryUrl)
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -121,8 +123,10 @@ arDdnsApi() {
|
|||||||
|
|
||||||
if type curl >/dev/null 2>&1; then
|
if type curl >/dev/null 2>&1; then
|
||||||
curl -4 -s -A $agent -d $params $dnsapi
|
curl -4 -s -A $agent -d $params $dnsapi
|
||||||
else
|
elif ! wget --help 2>&1 | grep -qs BusyBox; then
|
||||||
wget -4 -q -O- --no-check-certificate -U $agent --post-data $params $dnsapi
|
wget -4 -q -O- --no-check-certificate -U $agent --post-data $params $dnsapi
|
||||||
|
else
|
||||||
|
wget -q -O- --no-check-certificate -U $agent --post-data $params $dnsapi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user