From c9511c3c63bfce993d10d17e78053202829d580a Mon Sep 17 00:00:00 2001 From: Will Bogey Date: Sat, 1 Dec 2018 10:50:17 -0500 Subject: [PATCH] Check IP of subdomain rather than domain --- dyndns.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dyndns.sh b/dyndns.sh index 61e83da..3386247 100755 --- a/dyndns.sh +++ b/dyndns.sh @@ -20,7 +20,7 @@ while ( true ); do -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ $dns_list) 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!"