1
0
Fork 0
mirror of https://github.com/tunix/digitalocean-dyndns synced 2024-12-22 04:49:52 +00:00

Merge pull request #5 from wbio/master

Check IP of subdomain rather than domain
This commit is contained in:
Alper Kanat 2018-12-05 12:34:34 +03:00 committed by GitHub
commit a3553daa2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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!"