|
|
@ -347,19 +347,17 @@ _startserver() {
|
|
|
|
_NC="nc -l"
|
|
|
|
_NC="nc -l"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
#debian
|
|
|
|
|
|
|
|
ncver="$(nc --version 2>&1)"
|
|
|
|
|
|
|
|
if echo "$ncver" | grep "http://www.deepspace6.net" > /dev/null ; then
|
|
|
|
|
|
|
|
_NC="$_NC -p"
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_debug "$_NC $Le_HTTPPort"
|
|
|
|
_debug "$_NC $Le_HTTPPort"
|
|
|
|
# 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 $Le_HTTPPort -vv
|
|
|
|
if ! echo -e -n "HTTP/1.1 200 OK\r\n\r\n$content" | $_NC -p $Le_HTTPPort -vv ; then
|
|
|
|
|
|
|
|
echo -e -n "HTTP/1.1 200 OK\r\n\r\n$content" | $_NC $Le_HTTPPort -vv ;
|
|
|
|
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
else
|
|
|
|
|
|
|
|
if ! echo -e -n "HTTP/1.1 200 OK\r\n\r\n$content" | $_NC -p $Le_HTTPPort > /dev/null ; then
|
|
|
|
echo -e -n "HTTP/1.1 200 OK\r\n\r\n$content" | $_NC $Le_HTTPPort > /dev/null
|
|
|
|
echo -e -n "HTTP/1.1 200 OK\r\n\r\n$content" | $_NC $Le_HTTPPort > /dev/null
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
fi
|
|
|
|
if [ "$?" != "0" ] ; then
|
|
|
|
if [ "$?" != "0" ] ; then
|
|
|
|
_err "nc listen error."
|
|
|
|
_err "nc listen error."
|
|
|
|
return 1
|
|
|
|
return 1
|
|
|
|