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
f78babfa
Commit
f78babfa
authored
Oct 10, 2016
by
neil
Committed by
GitHub
Oct 10, 2016
Browse files
nc (#324)
parent
66990cf8
Changes
1
Hide whitespace changes
Inline
Side-by-side
acme.sh
View file @
f78babfa
...
@@ -1205,26 +1205,30 @@ _startserver() {
...
@@ -1205,26 +1205,30 @@ _startserver() {
_debug
"startserver:
$$
"
_debug
"startserver:
$$
"
nchelp
=
"
$(
nc
-h
2>&1
)
"
nchelp
=
"
$(
nc
-h
2>&1
)
"
if
echo
"
$nchelp
"
|
grep
"
\-
q[ ,]"
>
/dev/null
;
then
_NC
=
"nc -q 1 -l
$ncaddr
"
else
if
echo
"
$nchelp
"
|
grep
"GNU netcat"
>
/dev/null
&&
echo
"
$nchelp
"
|
grep
"
\-
c,
\-\-
close"
>
/dev/null
;
then
_NC
=
"nc -c -l
$ncaddr
"
elif
echo
"
$nchelp
"
|
grep
"
\-
N"
|grep
"Shutdown the network socket after EOF on stdin"
>
/dev/null
;
then
_NC
=
"nc -N -l
$ncaddr
"
else
_NC
=
"nc -l
$ncaddr
"
fi
fi
_debug Le_HTTPPort
"
$Le_HTTPPort
"
_debug Le_HTTPPort
"
$Le_HTTPPort
"
_debug Le_Listen_V4
"
$Le_Listen_V4
"
_debug Le_Listen_V4
"
$Le_Listen_V4
"
_debug Le_Listen_V6
"
$Le_Listen_V6
"
_debug Le_Listen_V6
"
$Le_Listen_V6
"
_NC
=
"nc"
if
[
"
$Le_Listen_V4
"
]
;
then
if
[
"
$Le_Listen_V4
"
]
;
then
_NC
=
"
$_NC
-4"
_NC
=
"
$_NC
-4"
elif
[
"
$Le_Listen_V6
"
]
;
then
elif
[
"
$Le_Listen_V6
"
]
;
then
_NC
=
"
$_NC
-6"
_NC
=
"
$_NC
-6"
fi
fi
if
echo
"
$nchelp
"
|
grep
"
\-
q[ ,]"
>
/dev/null
;
then
_NC
=
"
$_NC
-q 1 -l
$ncaddr
"
else
if
echo
"
$nchelp
"
|
grep
"GNU netcat"
>
/dev/null
&&
echo
"
$nchelp
"
|
grep
"
\-
c,
\-\-
close"
>
/dev/null
;
then
_NC
=
"
$_NC
-c -l
$ncaddr
"
elif
echo
"
$nchelp
"
|
grep
"
\-
N"
|grep
"Shutdown the network socket after EOF on stdin"
>
/dev/null
;
then
_NC
=
"
$_NC
-N -l
$ncaddr
"
else
_NC
=
"
$_NC
-l
$ncaddr
"
fi
fi
_debug
"_NC"
"
$_NC
"
_debug
"_NC"
"
$_NC
"
# while true ; do
# while true ; do
...
...
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