Browse Source
Merge pull request #2662 from tambetliiv/zone-root-check
zone.eu dns api: use different method to get root
shebang
neil
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
dnsapi/dns_zone.sh
|
@ -136,10 +136,10 @@ _get_root() { |
|
|
if [ -z "$h" ]; then |
|
|
if [ -z "$h" ]; then |
|
|
return 1 |
|
|
return 1 |
|
|
fi |
|
|
fi |
|
|
if ! _zone_rest GET "dns/$h/a"; then |
|
|
|
|
|
|
|
|
if ! _zone_rest GET "dns/$h"; then |
|
|
return 1 |
|
|
return 1 |
|
|
fi |
|
|
fi |
|
|
if _contains "$response" "\"name\":\"$h\"" >/dev/null; then |
|
|
|
|
|
|
|
|
if _contains "$response" "\"identificator\":\"$h\"" >/dev/null; then |
|
|
_domain=$h |
|
|
_domain=$h |
|
|
return 0 |
|
|
return 0 |
|
|
fi |
|
|
fi |
|
|