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
3f1a76d9
Commit
3f1a76d9
authored
Apr 27, 2017
by
neil
Browse files
fix
https://github.com/Neilpang/acme.sh/issues/808
parent
4c1d5217
Changes
1
Hide whitespace changes
Inline
Side-by-side
acme.sh
View file @
3f1a76d9
...
...
@@ -2617,10 +2617,10 @@ _checkConf() {
_isRealNginxConf
()
{
_debug
"_isRealNginxConf
$1
$2
"
if
[
-f
"
$2
"
]
;
then
for
_fln
in
$(
grep
-n
"^ *server_name.*
$1
"
"
$2
"
|
cut
-d
:
-f
1
)
;
do
for
_fln
in
$(
tr
"
\t
"
' '
<
"
$2
"
|
grep
-n
"^ *server_name.*
$1
"
|
cut
-d
:
-f
1
)
;
do
_debug _fln
"
$_fln
"
if
[
"
$_fln
"
]
;
then
_start
=
$(
cat
"
$2
"
| _head_n
"
$_fln
"
|
grep
-n
"^ *server *{"
| _tail_n 1
)
_start
=
$(
tr
"
\t
"
' '
<
"
$2
"
| _head_n
"
$_fln
"
|
grep
-n
"^ *server *{"
| _tail_n 1
)
_debug
"_start"
"
$_start
"
_start_n
=
$(
echo
"
$_start
"
|
cut
-d
:
-f
1
)
_start_nn
=
$(
_math
$_start_n
+ 1
)
...
...
@@ -2629,8 +2629,8 @@ _isRealNginxConf() {
_left
=
"
$(
sed
-n
"
${
_start_nn
}
,99999p"
"
$2
"
)
"
_debug2 _left
"
$_left
"
if
echo
"
$_left
"
|
grep
-n
"^ *server *{"
>
/dev/null
;
then
_end
=
$(
echo
"
$_left
"
|
grep
-n
"^ *server *{"
| _head_n 1
)
if
echo
"
$_left
"
|
tr
"
\t
"
' '
|
grep
-n
"^ *server *{"
>
/dev/null
;
then
_end
=
$(
echo
"
$_left
"
|
tr
"
\t
"
' '
|
grep
-n
"^ *server *{"
| _head_n 1
)
_debug
"_end"
"
$_end
"
_end_n
=
$(
echo
"
$_end
"
|
cut
-d
:
-f
1
)
_debug
"_end_n"
"
$_end_n
"
...
...
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