Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
63fca33b
Unverified
Commit
63fca33b
authored
May 29, 2023
by
Martin Arndt
Committed by
GitHub
May 29, 2023
Browse files
Fix retrieval of domain zone
parent
13c71829
Changes
1
Show whitespace changes
Inline
Side-by-side
dnsapi/dns_artfiles.sh
View file @
63fca33b
...
...
@@ -140,14 +140,13 @@ _dns() {
# Gets the root domain zone for given domain.
# Usage: _get_zone _acme-challenge.www.example.com
_get_zone
()
{
_info
'Getting domain zone...'
_debug2
'Initial FQDN'
"
$1
"
fqdn
=
"
$1
"
fqdn
=
"
${
fqdn
#*.
}
"
# Strip "_acme-challenge" right away
_debug2
'Reduced FQDN'
"
$fqdn
"
domains
=
"
$(
_get
"
$AF_URL_DOMAINS
"
""
10
)
"
_info
'Getting domain zone...'
_debug2
'FQDN'
"
$fqdn
"
_debug2
'Domains'
"
$domains
"
domains
=
"
$(
_get
"
$AF_URL_DOMAINS
"
''
10
)
"
while
true
;
do
while
_contains
"
$fqdn
"
"."
;
do
if
_contains
"
$domains
"
"
$fqdn
"
;
then
domain
=
"
$fqdn
"
_info
"Found root domain zone:
$domain
"
...
...
@@ -162,7 +161,7 @@ _get_zone() {
return
0
fi
_err
"
Couldn't find root domain zone.
"
_err
'
Couldn
\
'
t find root domain zone.
'
return 1
}
...
...
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