mirror of
https://github.com/plantroon/acme.sh.git
synced 2024-12-22 13:11:41 +00:00
make the nc exit automatically, don't use kill anymore.
This commit is contained in:
parent
282eae22a2
commit
9877d46620
8
le.sh
8
le.sh
@ -222,13 +222,13 @@ _setopt() {
|
|||||||
|
|
||||||
_startserver() {
|
_startserver() {
|
||||||
content="$1"
|
content="$1"
|
||||||
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 -q 1 -l -p 80
|
echo -e -n "HTTP/1.1 200 OK\r\n\r\n$content" | nc -q 1 -l -p 80
|
||||||
else
|
else
|
||||||
echo -e -n "HTTP/1.1 200 OK\r\n\r\n$content" | nc -q 1 -l -p 80 > /dev/null
|
echo -e -n "HTTP/1.1 200 OK\r\n\r\n$content" | nc -q 1 -l -p 80 > /dev/null
|
||||||
fi
|
fi
|
||||||
done
|
# done
|
||||||
}
|
}
|
||||||
|
|
||||||
_stopserver() {
|
_stopserver() {
|
||||||
@ -236,11 +236,11 @@ _stopserver() {
|
|||||||
if [ "$pid" ] ; then
|
if [ "$pid" ] ; then
|
||||||
if [ "$DEBUG" ] ; then
|
if [ "$DEBUG" ] ; then
|
||||||
kill -s 9 $pid
|
kill -s 9 $pid
|
||||||
killall -s 9 nc
|
# killall -s 9 nc
|
||||||
else
|
else
|
||||||
kill -s 9 $pid > /dev/null
|
kill -s 9 $pid > /dev/null
|
||||||
wait $pid 2>/dev/null
|
wait $pid 2>/dev/null
|
||||||
killall -s 9 nc > /dev/null
|
# killall -s 9 nc > /dev/null
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user