minor, add more debug info

This commit is contained in:
neil 2016-06-25 09:40:00 +08:00
parent 687cfcc2b1
commit 87ab2d9085
1 changed files with 7 additions and 3 deletions

10
acme.sh
View File

@ -644,7 +644,11 @@ _post() {
fi fi
_ret="$?" _ret="$?"
if [ "$_ret" != "0" ] ; then 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 fi
else else
_debug "WGET" "$WGET" _debug "WGET" "$WGET"
@ -986,10 +990,10 @@ _initpath() {
WGET="$WGET -d " WGET="$WGET -d "
fi fi
dp="$LE_WORKING_DIR/curl.dump" _CURL_DUMP="$LE_WORKING_DIR/curl.dump"
CURL="curl -L --silent" CURL="curl -L --silent"
if [ "$DEBUG" ] && [ "$DEBUG" -ge "2" ] ; then if [ "$DEBUG" ] && [ "$DEBUG" -ge "2" ] ; then
CURL="$CURL --trace-ascii $dp " CURL="$CURL --trace-ascii $_CURL_DUMP "
fi fi
if [ "$Le_Insecure" ] ; then if [ "$Le_Insecure" ] ; then