use different method to get root

This commit is contained in:
Tambet Liiv 2020-01-02 14:55:36 +02:00
parent f59f484c01
commit b59b0f0386

View File

@ -136,10 +136,10 @@ _get_root() {
if [ -z "$h" ]; then
return 1
fi
if ! _zone_rest GET "dns/$h/a"; then
if ! _zone_rest GET "dns/$h"; then
return 1
fi
if _contains "$response" "\"name\":\"$h\"" >/dev/null; then
if _contains "$response" "\"identificator\":\"$h\"" >/dev/null; then
_domain=$h
return 0
fi