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
958a2f42
Unverified
Commit
958a2f42
authored
Jul 05, 2020
by
neil
Committed by
GitHub
Jul 05, 2020
Browse files
Merge pull request #3017 from metaquanta/master
dns_duckdns.sh - correctly extract domain
parents
c650ae0e
21718a69
Changes
1
Show whitespace changes
Inline
Side-by-side
dnsapi/dns_duckdns.sh
View file @
958a2f42
...
@@ -91,13 +91,12 @@ dns_duckdns_rm() {
...
@@ -91,13 +91,12 @@ dns_duckdns_rm() {
#################### Private functions below ##################################
#################### Private functions below ##################################
#fulldomain=_acme-challenge.domain.duckdns.org
# fulldomain may be 'domain.duckdns.org' (if using --domain-alias) or '_acme-challenge.domain.duckdns.org'
#returns
# either way, return 'domain'. (duckdns does not allow further subdomains and restricts domains to [a-z0-9-].)
# _duckdns_domain=domain
_duckdns_get_domain
()
{
_duckdns_get_domain
()
{
# We'll extract the domain/username from full domain
# We'll extract the domain/username from full domain
_duckdns_domain
=
"
$(
printf
"%s"
"
$fulldomain
"
| _lower_case | _egrep_o
'
[.][^.][^.]*[.]
duckdns.org'
|
cut
-d
.
-f
2
)
"
_duckdns_domain
=
"
$(
printf
"%s"
"
$fulldomain
"
| _lower_case | _egrep_o
'
^(_acme-challenge\.)?[a-z0-9-]*\.
duckdns
\
.org'
|
sed
's/^\(_acme-challenge\.\)\?\([a-z0-9-]*\)\.duckdns\.org/\2/'
)
"
if
[
-z
"
$_duckdns_domain
"
]
;
then
if
[
-z
"
$_duckdns_domain
"
]
;
then
_err
"Error extracting the domain."
_err
"Error extracting the domain."
...
...
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