Couldn't get domain name when only domain provided

This commit is contained in:
Eric Renfro 2021-08-23 11:33:18 -04:00
parent 49835b586b
commit 0f27928920
Signed by: psi-jack
GPG Key ID: 14977F3A50D9A5BF
1 changed files with 9 additions and 0 deletions

View File

@ -37,6 +37,15 @@ _update_dns_linode_v4_get_domain() {
page=$(echo "$response" | jq ".page")
total_pages=$(echo "$response" | jq ".pages")
domain_id="$(sed -e 's/^"//' -e 's/"$//' <<<"$(echo "$response" | jq --arg domain "$DIP_RECORD" '.data[] | select(.domain==$domain).id')")"
if [[ -n "$domain_id" ]]
then
_sub_domain=""
_domain=$DIP_RECORD
_domain_id=$domain_id
return 0
fi
while true
do
h=$(printf "%s" "$DIP_RECORD" | cut -d . -f $i-100)