]> git.proxmox.com Git - mirror_acme.sh.git/commitdiff
fix for ncat on centos, try without '-p' first (#315)
authorneil <github@byneil.com>
Tue, 4 Oct 2016 15:35:56 +0000 (23:35 +0800)
committerGitHub <noreply@github.com>
Tue, 4 Oct 2016 15:35:56 +0000 (23:35 +0800)
acme.sh

diff --git a/acme.sh b/acme.sh
index cf83f25011a55f8f2abbd6312251a2d73542c902..e6c5b71c51dbd74d3059e3301cb7a8f806ba8232 100755 (executable)
--- 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