Skip to content

Commit

Permalink
Update update.sh
Browse files Browse the repository at this point in the history
Signed-off-by: Zoey <[email protected]>
  • Loading branch information
Zoey2936 authored Dec 25, 2024
1 parent aadb933 commit fa4a717
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ if [ "$IPv4" = "false" ] && [ "$IPv6" = "false" ]; then
sleep inf
fi

for DUD in $DUDs; do
if [ "$IPv4" = "true" ]; then
curl -sSL4 "https://ipv4.ipv64.net/nic/update?key=$DUK&domain=$DUD" | tee /tmp/IPv4.json
fi
if [ "$IPv6" = "true" ]; then
curl -sSL6 "https://ipv6.ipv64.net/nic/update?key=$DUK&domain=$DUD" | tee /tmp/IPv6.json
fi
done

while true; do
for DUD in $DUDs; do
if [ "$IPv4" = "true" ] && [ "$(curl -sS4 https://ipv4.ipv64.net/ipcheck.php?ipv4)" != "$(dig "$DUD" IN A +short +https +tls-ca=/etc/ssl/certs/ca-certificates.crt @1.1.1.1 | grep '^[0-9.]\+$' | sort | head -n1)" ]; then
Expand Down

0 comments on commit fa4a717

Please sign in to comment.