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
63045666
Commit
63045666
authored
Jul 04, 2017
by
neil
Committed by
GitHub
Jul 04, 2017
Browse files
Merge pull request #927 from Neilpang/dev
Dev
parents
c53f36a7
5f8b60a0
Changes
2
Hide whitespace changes
Inline
Side-by-side
acme.sh
View file @
63045666
...
...
@@ -3543,11 +3543,11 @@ issue() {
if [ "$d_api" ]; then
_info "Found domain api file: $d_api"
else
_
err
"Add the following TXT record:"
_
err
"Domain: '
$(
__green
"
$txtdomain
"
)
'"
_
err
"TXT value: '
$(
__green
"
$txt
"
)
'"
_
err
"Please be aware that you prepend _acme-challenge. before your domain"
_
err
"so the resulting subdomain will be:
$txtdomain
"
_
info "$(__red
"Add the following TXT record:"
)"
_
info "$(__red
"Domain: '$(__green "$txtdomain")'"
)"
_
info "$(__red
"TXT value: '$(__green "$txt")'"
)"
_
info "$(__red
"Please be aware that you prepend _acme-challenge. before your domain"
)"
_
info "$(__red
"so the resulting subdomain will be: $txtdomain"
)"
continue
fi
...
...
@@ -3583,7 +3583,7 @@ issue() {
_debug "Dns record not added yet, so, save to $DOMAIN_CONF and exit."
_err "Please add the TXT records to the domains, and retry again."
_clearup
_on_issue_err
"
$_post_hook
"
"
$vlist
"
_on_issue_err "$_post_hook"
return 1
fi
...
...
dnsapi/dns_namecom.sh
View file @
63045666
...
...
@@ -168,21 +168,26 @@ _namecom_get_root() {
i
=
2
p
=
1
if
_namecom_rest GET
"domain/list"
;
then
while
true
;
do
host
=
$(
printf
"%s"
"
$domain
"
|
cut
-d
.
-f
$i
-100
)
if
[
-z
"
$host
"
]
;
then
return
1
fi
if
_contains
"
$response
"
"
$host
"
;
then
_sub_domain
=
$(
printf
"%s"
"
$domain
"
|
cut
-d
.
-f
1-
$p
)
_domain
=
"
$host
"
return
0
fi
p
=
$i
i
=
$(
_math
"
$i
"
+ 1
)
done
if
!
_namecom_rest GET
"domain/list"
;
then
return
1
fi
# Need to exclude the last field (tld)
numfields
=
$(
echo
"
$domain
"
| _egrep_o
"
\.
"
|
wc
-l
)
while
[
$i
-le
"
$numfields
"
]
;
do
host
=
$(
printf
"%s"
"
$domain
"
|
cut
-d
.
-f
$i
-100
)
_debug host
"
$host
"
if
[
-z
"
$host
"
]
;
then
return
1
fi
if
_contains
"
$response
"
"
$host
"
;
then
_sub_domain
=
$(
printf
"%s"
"
$domain
"
|
cut
-d
.
-f
1-
$p
)
_domain
=
"
$host
"
return
0
fi
p
=
$i
i
=
$(
_math
"
$i
"
+ 1
)
done
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