From b7ec6789b36f2675d093ec958ba32f1bf3dd342d Mon Sep 17 00:00:00 2001 From: neil Date: Mon, 30 May 2016 21:55:49 +0800 Subject: [PATCH] add more log --- acme.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/acme.sh b/acme.sh index 66feabab..d5061c7b 100755 --- a/acme.sh +++ b/acme.sh @@ -1449,8 +1449,15 @@ issue() { fi if [ "$status" = "invalid" ] ; then - error="$(echo $response | egrep -o '"error":{[^}]*}' | grep -o '"detail":"[^"]*"' | cut -d '"' -f 4)" - _err "$d:Verify error:$error" + error="$(echo $response | egrep -o '"error":{[^}]*}')" + _debug2 error "$error" + errordetail="$(echo $error | grep -o '"detail": *"[^"]*"' | cut -d '"' -f 4)" + _debug2 errordetail "$errordetail" + if [ "$errordetail" ] ; then + _err "$d:Verify error:$errordetail" + else + _err "$d:Verify error:$error" + fi _clearupwebbroot "$_currentRoot" "$removelevel" "$token" _clearup return 1;