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
874bd093
Unverified
Commit
874bd093
authored
Aug 05, 2019
by
neil
Committed by
GitHub
Aug 05, 2019
Browse files
fix
https://github.com/Neilpang/acme.sh/issues/2409
(#2430)
parent
143eac09
Changes
1
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_he.sh
View file @
874bd093
...
@@ -134,9 +134,9 @@ _find_zone() {
...
@@ -134,9 +134,9 @@ _find_zone() {
_zone_ids
=
$(
echo
"
$_matches
"
| _egrep_o
"hosted_dns_zoneid=[0-9]*&"
|
cut
-d
=
-f
2 |
tr
-d
'&'
)
_zone_ids
=
$(
echo
"
$_matches
"
| _egrep_o
"hosted_dns_zoneid=[0-9]*&"
|
cut
-d
=
-f
2 |
tr
-d
'&'
)
_zone_names
=
$(
echo
"
$_matches
"
| _egrep_o
"name=.*onclick"
|
cut
-d
'"'
-f
2
)
_zone_names
=
$(
echo
"
$_matches
"
| _egrep_o
"name=.*onclick"
|
cut
-d
'"'
-f
2
)
_debug2
"These are the zones on this HE account:"
_debug2
"These are the zones on this HE account:"
_debug2
"
$_zone_names
"
_debug2
"_zone_names"
"
$_zone_names
"
_debug2
"And these are their respective IDs:"
_debug2
"And these are their respective IDs:"
_debug2
"
$_zone_ids
"
_debug2
"_zone_ids"
"
$_zone_ids
"
if
[
-z
"
$_zone_names
"
]
||
[
-z
"
$_zone_ids
"
]
;
then
if
[
-z
"
$_zone_names
"
]
||
[
-z
"
$_zone_ids
"
]
;
then
_err
"Can not get zone names."
_err
"Can not get zone names."
return
1
return
1
...
@@ -154,10 +154,14 @@ _find_zone() {
...
@@ -154,10 +154,14 @@ _find_zone() {
_debug
"Looking for zone
\"
${
_attempted_zone
}
\"
"
_debug
"Looking for zone
\"
${
_attempted_zone
}
\"
"
line_num
=
"
$(
echo
"
$_zone_names
"
|
grep
-n
"^
$_attempted_zone
"
|
cut
-d
:
-f
1
)
"
line_num
=
"
$(
echo
"
$_zone_names
"
|
grep
-n
"^
$_attempted_zone
\$
"
| _head_n 1
|
cut
-d
:
-f
1
)
"
_debug2 line_num
"
$line_num
"
if
[
"
$line_num
"
]
;
then
if
[
"
$line_num
"
]
;
then
_zone_id
=
$(
echo
"
$_zone_ids
"
|
sed
-n
"
${
line_num
}
p"
)
_zone_id
=
$(
echo
"
$_zone_ids
"
|
sed
-n
"
${
line_num
}
p"
)
if
[
-z
"
$_zone_id
"
]
;
then
_err
"Can not find zone id."
return
1
fi
_debug
"Found relevant zone
\"
$_attempted_zone
\"
with id
\"
$_zone_id
\"
- will be used for domain
\"
$_domain
\"
."
_debug
"Found relevant zone
\"
$_attempted_zone
\"
with id
\"
$_zone_id
\"
- will be used for domain
\"
$_domain
\"
."
return
0
return
0
fi
fi
...
...
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