From: neil Date: Tue, 4 Oct 2016 15:35:56 +0000 (+0800) Subject: fix for ncat on centos, try without '-p' first (#315) X-Git-Tag: 2.8.6~431^2 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=3d826bed3afdb2b9f61d069c3810f9cff9aa284c;p=mirror_acme.sh.git fix for ncat on centos, try without '-p' first (#315) --- diff --git a/acme.sh b/acme.sh index cf83f250..e6c5b71c 100755 --- a/acme.sh +++ b/acme.sh @@ -1226,12 +1226,12 @@ _startserver() { # while true ; do if [ "$DEBUG" ] ; then - if ! printf "HTTP/1.1 200 OK\r\n\r\n$content" | $_NC -p $Le_HTTPPort ; then - printf "HTTP/1.1 200 OK\r\n\r\n$content" | $_NC $Le_HTTPPort ; + if ! printf "HTTP/1.1 200 OK\r\n\r\n$content" | $_NC $Le_HTTPPort ; then + printf "HTTP/1.1 200 OK\r\n\r\n$content" | $_NC -p $Le_HTTPPort ; fi else - if ! printf "HTTP/1.1 200 OK\r\n\r\n$content" | $_NC -p $Le_HTTPPort > /dev/null 2>&1; then - printf "HTTP/1.1 200 OK\r\n\r\n$content" | $_NC $Le_HTTPPort > /dev/null 2>&1 + if ! printf "HTTP/1.1 200 OK\r\n\r\n$content" | $_NC $Le_HTTPPort > /dev/null 2>&1; then + printf "HTTP/1.1 200 OK\r\n\r\n$content" | $_NC -p $Le_HTTPPort > /dev/null 2>&1 fi fi if [ "$?" != "0" ] ; then