Browse Source

minor, add more debug info

master
neil 9 years ago
parent
commit
dcf9cb581d
  1. 44
      acme.sh

44
acme.sh

@ -1,6 +1,6 @@
#!/usr/bin/env sh #!/usr/bin/env sh
VER=2.3.1
VER=2.3.2
PROJECT_NAME="acme.sh" PROJECT_NAME="acme.sh"
@ -902,9 +902,23 @@ _stopserver(){
return return
fi fi
_debug2 "Le_HTTPPort" "$Le_HTTPPort"
if [ "$Le_HTTPPort" ] ; then
if [ "$DEBUG" ] ; then
_get "http://localhost:$Le_HTTPPort"
else
_get "http://localhost:$Le_HTTPPort" >/dev/null 2>&1 _get "http://localhost:$Le_HTTPPort" >/dev/null 2>&1
_get "https://localhost:$Le_TLSPort" >/dev/null 2>&1
fi
fi
_debug2 "Le_TLSPort" "$Le_TLSPort"
if [ "$Le_TLSPort" ] ; then
if [ "$DEBUG" ] ; then
_get "https://localhost:$Le_TLSPort"
else
_get "https://localhost:$Le_TLSPort" >/dev/null 2>&1
fi
fi
} }
@ -1244,19 +1258,25 @@ _clearupwebbroot() {
return 0 return 0
fi fi
_rmpath=""
if [ "$2" = '1' ] ; then if [ "$2" = '1' ] ; then
_debug "remove $__webroot/.well-known"
rm -rf "$__webroot/.well-known"
_rmpath="$__webroot/.well-known"
elif [ "$2" = '2' ] ; then elif [ "$2" = '2' ] ; then
_debug "remove $__webroot/.well-known/acme-challenge"
rm -rf "$__webroot/.well-known/acme-challenge"
_rmpath="$__webroot/.well-known/acme-challenge"
elif [ "$2" = '3' ] ; then elif [ "$2" = '3' ] ; then
_debug "remove $__webroot/.well-known/acme-challenge/$3"
rm -rf "$__webroot/.well-known/acme-challenge/$3"
_rmpath="$__webroot/.well-known/acme-challenge/$3"
else else
_debug "Skip for removelevel:$2" _debug "Skip for removelevel:$2"
fi fi
if [ "$_rmpath" ] ; then
if [ "$DEBUG" ] ; then
_debug "Debugging, skip removing: $_rmpath"
else
rm -rf "$_rmpath"
fi
fi
return 0 return 0
} }
@ -1735,6 +1755,11 @@ issue() {
else else
_err "$d:Verify error:$error" _err "$d:Verify error:$error"
fi fi
if [ "$DEBUG" ] ; then
if [ "$vtype" = "$VTYPE_HTTP" ] ; then
_get "http://$d/.well-known/acme-challenge/$token"
fi
fi
_clearupwebbroot "$_currentRoot" "$removelevel" "$token" _clearupwebbroot "$_currentRoot" "$removelevel" "$token"
_clearup _clearup
return 1; return 1;
@ -2806,6 +2831,9 @@ _process() {
shift 1 shift 1
done done
if [ "$DEBUG" ] ; then
version
fi
case "${_CMD}" in case "${_CMD}" in
install) install "$_nocron" ;; install) install "$_nocron" ;;

Loading…
Cancel
Save