Skip to content

Commit

Permalink
Fix no "-4" and "-6" parameter when using busybox wget
Browse files Browse the repository at this point in the history
  • Loading branch information
Vigilans committed Sep 11, 2022
1 parent f04fddb commit b6fe976
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ardnspod
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,10 @@ arWanIp6() {
if [ -z "$hostIp" ]; then
if type curl >/dev/null 2>&1; then
hostIp=$(curl -6 -s $arIp6QueryUrl)
else
elif ! wget --help 2>&1 | grep -qs BusyBox; then
hostIp=$(wget -6 -q -O- $arIp6QueryUrl)
else
hostIp=$(wget -q -O- $arIp6QueryUrl)
fi
fi

Expand Down Expand Up @@ -121,8 +123,10 @@ arDdnsApi() {

if type curl >/dev/null 2>&1; then
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
else
wget -q -O- --no-check-certificate -U $agent --post-data $params $dnsapi
fi

}
Expand Down

0 comments on commit b6fe976

Please sign in to comment.