Couldn't get domain name when only domain provided
This commit is contained in:
parent
49835b586b
commit
0f27928920
1 changed files with 9 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue