Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
29a7c193
Unverified
Commit
29a7c193
authored
Feb 12, 2021
by
neil
Committed by
GitHub
Feb 12, 2021
Browse files
Merge pull request #3403 from manuelm/dev
dnsapi/pdns: also normalize json response in detecting root zone
parents
e7fc697e
8636d313
Changes
1
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_pdns.sh
View file @
29a7c193
...
...
@@ -175,13 +175,13 @@ _get_root() {
i
=
1
if
_pdns_rest
"GET"
"/api/v1/servers/
$PDNS_ServerId
/zones"
;
then
_zones_response
=
"
$response
"
_zones_response
=
$(
echo
"
$response
"
| _normalizeJson
)
fi
while
true
;
do
h
=
$(
printf
"%s"
"
$domain
"
|
cut
-d
.
-f
$i
-100
)
if
_contains
"
$_zones_response
"
"
\"
name
\"
:
\"
$h
.
\"
"
;
then
if
_contains
"
$_zones_response
"
"
\"
name
\"
:
\"
$h
.
\"
"
;
then
_domain
=
"
$h
."
if
[
-z
"
$h
"
]
;
then
_domain
=
"=2E"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment