1
0
Fork 0
mirror of https://github.com/tunix/digitalocean-dyndns synced 2024-05-18 05:33:38 +00:00

Try both ipinfo.io and ifconfig.me

This commit is contained in:
Viktor Gustavsson 2020-12-07 17:32:51 +01:00
parent 14aa8191df
commit b81e1815e3

View file

@ -20,7 +20,8 @@ while ( true ); do
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
$dns_list"?per_page=200")
ip="$(curl -s ifconfig.me)"
ip="$(curl -s ipinfo.io/ip)"
if [[ -z $ip ]]; then ip=$(curl -s ifconfig.me); fi
if [[ -n $ip ]]; then
for sub in ${NAME//;/ }; do