mirror of
https://github.com/tunix/digitalocean-dyndns
synced 2024-12-22 12:59:52 +00:00
Check IP of subdomain rather than domain
This commit is contained in:
parent
85ee2538ff
commit
c9511c3c63
1 changed files with 1 additions and 1 deletions
|
@ -20,7 +20,7 @@ while ( true ); do
|
||||||
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
|
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
|
||||||
$dns_list)
|
$dns_list)
|
||||||
record_id=$(echo $domain_records| jq ".domain_records[] | select(.type == \"A\" and .name == \"$NAME\") | .id")
|
record_id=$(echo $domain_records| jq ".domain_records[] | select(.type == \"A\" and .name == \"$NAME\") | .id")
|
||||||
record_data=$(echo $domain_records| jq -r ".domain_records[] | select(.type == \"A\" and .name == \"@\") | .data")
|
record_data=$(echo $domain_records| jq -r ".domain_records[] | select(.type == \"A\" and .name == \"$NAME\") | .data")
|
||||||
|
|
||||||
test -z $record_id && die "No record found with given domain name!"
|
test -z $record_id && die "No record found with given domain name!"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue