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
016dca65
Commit
016dca65
authored
Feb 11, 2021
by
manuel
Committed by
Alexander Kulumbeg
Mar 21, 2021
Browse files
dnsapi/pdns: also normalize json response in detecting root zone
parent
6502bdec
Changes
1
Show whitespace changes
Inline
Side-by-side
dnsapi/dns_pdns.sh
View file @
016dca65
...
...
@@ -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