Fixing linode-v4 script errors-1
This commit is contained in:
parent
0563515cdf
commit
79b47ad0f6
1 changed files with 3 additions and 3 deletions
|
@ -29,7 +29,7 @@ _update_dns_linode_v4_get_domain() {
|
||||||
|
|
||||||
while read -r response
|
while read -r response
|
||||||
do
|
do
|
||||||
if [[ -n "$(echo "$response" | jq "select(.errors != null)")" ]]
|
if [[ -n "$(echo "$response" | jq 'select(.errors != null)')" ]]
|
||||||
then
|
then
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
@ -46,7 +46,7 @@ _update_dns_linode_v4_get_domain() {
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
domain_id="$(sed -e 's/^"//' -e 's/"$//' <<<"$(echo "$response" | jq --arg domain="$h" '.data[] | select(.domain==$domain).id')")"
|
domain_id="$(sed -e 's/^"//' -e 's/"$//' <<<"$(echo "$response" | jq --arg domain "$h" '.data[] | select(.domain==$domain).id')")"
|
||||||
|
|
||||||
if [[ -n "$domain_id" ]]
|
if [[ -n "$domain_id" ]]
|
||||||
then
|
then
|
||||||
|
@ -132,6 +132,6 @@ if _update_dns_linode_v4_get_domain; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
logerr "ERROR: Cannot find domain in DigitalOcean DNS API"
|
logerr "ERROR: Cannot find domain in Linode DNS API"
|
||||||
exit 99
|
exit 99
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue