From 87ab2d9085448d864a2b3827560582f69ab70322 Mon Sep 17 00:00:00 2001 From: neil Date: Sat, 25 Jun 2016 09:40:00 +0800 Subject: [PATCH] minor, add more debug info --- acme.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/acme.sh b/acme.sh index b22f2123..c2f185e8 100755 --- a/acme.sh +++ b/acme.sh @@ -644,7 +644,11 @@ _post() { fi _ret="$?" if [ "$_ret" != "0" ] ; then - _err "Please refer to https://curl.haxx.se/libcurl/c/libcurl-errors.html for error code: $_ret" + _err "Please refer to https://curl.haxx.se/libcurl/c/libcurl-errors.html for error code: $_ret" + if [ "$DEBUG" ] && [ "$DEBUG" -ge "2" ] ; then + _err "Here is the curl dump log:" + _err "$(cat "$_CURL_DUMP")" + fi fi else _debug "WGET" "$WGET" @@ -986,10 +990,10 @@ _initpath() { WGET="$WGET -d " fi - dp="$LE_WORKING_DIR/curl.dump" + _CURL_DUMP="$LE_WORKING_DIR/curl.dump" CURL="curl -L --silent" if [ "$DEBUG" ] && [ "$DEBUG" -ge "2" ] ; then - CURL="$CURL --trace-ascii $dp " + CURL="$CURL --trace-ascii $_CURL_DUMP " fi if [ "$Le_Insecure" ] ; then