mirror of
https://github.com/plantroon/acme.sh.git
synced 2024-12-27 07:21:53 +00:00
fix issue '-p' is needed by Debian nc tool
This commit is contained in:
parent
07f4ec4f73
commit
1b2e940d6a
21
le.sh
21
le.sh
@ -339,15 +339,26 @@ _saveaccountconf() {
|
|||||||
|
|
||||||
_startserver() {
|
_startserver() {
|
||||||
content="$1"
|
content="$1"
|
||||||
_NC="nc -q 1"
|
_NC="nc -q 1 -l"
|
||||||
if nc -h 2>&1 | grep "nmap.org/ncat" >/dev/null ; then
|
|
||||||
_NC="nc"
|
nchelp="$(nc -h 2>&1)"
|
||||||
|
if echo "$nchelp" | grep "nmap.org/ncat" >/dev/null ; then
|
||||||
|
_NC="nc -l"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if echo "$nchelp" | grep "--version" >/dev/null ; then
|
||||||
|
ncver="$(nc --version)"
|
||||||
|
if echo "$ncver" | grep "http://www.deepspace6.net" > /dev/null ; then
|
||||||
|
_NC="$_NC -p"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
_debug nc "$_NC"
|
||||||
# while true ; do
|
# while true ; do
|
||||||
if [ "$DEBUG" ] ; then
|
if [ "$DEBUG" ] ; then
|
||||||
echo -e -n "HTTP/1.1 200 OK\r\n\r\n$content" | $_NC -l $Le_HTTPPort -vv
|
echo -e -n "HTTP/1.1 200 OK\r\n\r\n$content" | $_NC $Le_HTTPPort -vv
|
||||||
else
|
else
|
||||||
echo -e -n "HTTP/1.1 200 OK\r\n\r\n$content" | $_NC -l $Le_HTTPPort > /dev/null
|
echo -e -n "HTTP/1.1 200 OK\r\n\r\n$content" | $_NC $Le_HTTPPort > /dev/null
|
||||||
fi
|
fi
|
||||||
# done
|
# done
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user