Fixing linode-v4 script errors-1

This commit is contained in:
Eric Renfro 2021-08-23 11:08:22 -04:00
parent 0563515cdf
commit 79b47ad0f6
Signed by: psi-jack
GPG key ID: 14977F3A50D9A5BF

View file

@ -29,7 +29,7 @@ _update_dns_linode_v4_get_domain() {
while read -r response
do
if [[ -n "$(echo "$response" | jq "select(.errors != null)")" ]]
if [[ -n "$(echo "$response" | jq 'select(.errors != null)')" ]]
then
return 1
fi
@ -46,7 +46,7 @@ _update_dns_linode_v4_get_domain() {
return 1
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" ]]
then
@ -132,6 +132,6 @@ if _update_dns_linode_v4_get_domain; then
fi
fi
else
logerr "ERROR: Cannot find domain in DigitalOcean DNS API"
logerr "ERROR: Cannot find domain in Linode DNS API"
exit 99
fi