Skip to content

Commit

Permalink
Update transIP_dns.sh
Browse files Browse the repository at this point in the history
Fix null error on response
  • Loading branch information
lapodomo authored Apr 23, 2023
1 parent d4b5375 commit d0587aa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions transipdns-addon/data/transIP_dns.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ _checkDnsARecord(){
if ! _transIP_rest GET "$fulldomain/dns" "" ; then
bashio::log.error "Could not load DNS records."
fi


if [[ "$response" == null ]]; then
bashio::log.error "Could not get data from TransIP."
else
if [[ "$IPV4" != "" ]]; then
Arecord=$(echo $response | jq -r '. as $root|$root.dnsEntries[] | select(.type == "A") | .content')
bashio::log.info "DNS record IPV4:" "$Arecord"
Expand Down Expand Up @@ -70,6 +71,7 @@ _checkDnsARecord(){
bashio::log.info "DNS record IPV6 is up to date"
fi
fi
fi

}

Expand Down

0 comments on commit d0587aa

Please sign in to comment.