From d65e3d9a6ee751594ba24ead2f46d1636a97adf5 Mon Sep 17 00:00:00 2001 From: rajcz Date: Fri, 3 Jun 2016 12:12:34 +0200 Subject: [PATCH 1/5] typos --- dnsapi/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dnsapi/README.md b/dnsapi/README.md index 7a208cdd..42e6a3ab 100644 --- a/dnsapi/README.md +++ b/dnsapi/README.md @@ -15,7 +15,7 @@ export CF_Email="xxxx@sss.com" Ok, let's issue cert now: ``` -le.sh --issue --dns dns_cf -d aa.com -d www.aa.com +acme.sh --issue --dns dns_cf -d aa.com -d www.aa.com ``` The `CF_Key` and `CF_Email` will be saved in `~/.acme.sh/account.conf`, when next time you use cloudflare api, it will reuse this key. @@ -37,7 +37,7 @@ export DP_Key="sADDsdasdgdsf" Ok, let's issue cert now: ``` -le.sh --issue --dns dns_dp -d aa.com -d www.aa.com +acme.sh --issue --dns dns_dp -d aa.com -d www.aa.com ``` The `DP_Id` and `DP_Key` will be saved in `~/.acme.sh/account.conf`, when next time you use dnspod.cn api, it will reuse this key. @@ -58,7 +58,7 @@ export CX_Secret="sADDsdasdgdsf" Ok, let's issue cert now: ``` -le.sh --issue --dns dns_cx -d aa.com -d www.aa.com +acme.sh --issue --dns dns_cx -d aa.com -d www.aa.com ``` The `CX_Key` and `CX_Secret` will be saved in `~/.acme.sh/account.conf`, when next time you use Cloudxns.com api, it will reuse this key. @@ -76,7 +76,7 @@ Let's assume you want to name it 'myapi', 3. Then you can use your api to issue cert like: ``` -le.sh --issue --dns dns_myapi -d aa.com -d www.aa.com +acme.sh --issue --dns dns_myapi -d aa.com -d www.aa.com ``` For more details, please check our sample script: [dns_myapi.sh](dns_myapi.sh) From 199067e8ab741ea89039a371dc73f58d527c1e5f Mon Sep 17 00:00:00 2001 From: neil Date: Sun, 5 Jun 2016 19:53:22 +0800 Subject: [PATCH 2/5] add Mageia status --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 508972f5..a1ebd8a2 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,7 @@ Wiki: https://github.com/Neilpang/acme.sh/wiki |13|[![](https://cdn.rawgit.com/Neilpang/acmetest/master/status/proxmox.svg)](https://github.com/Neilpang/letest#here-are-the-latest-status)| Proxmox https://pve.proxmox.com/wiki/HTTPSCertificateConfiguration#Let.27s_Encrypt_using_acme.sh |14|-----| Cloud Linux https://github.com/Neilpang/le/issues/111 |15|[![](https://cdn.rawgit.com/Neilpang/acmetest/master/status/openbsd.svg)](https://github.com/Neilpang/letest#here-are-the-latest-status)|OpenBSD +|16|[![](https://cdn.rawgit.com/Neilpang/acmetest/master/status/mageia.svg)](https://github.com/Neilpang/letest#here-are-the-latest-status)|Mageia For all build statuses, check our [daily build project](https://github.com/Neilpang/acmetest): From cc7fdbd661761fda037fc3a085a31328cb398391 Mon Sep 17 00:00:00 2001 From: neil Date: Tue, 7 Jun 2016 11:27:36 +0800 Subject: [PATCH 3/5] minor, remove the unnecessary error file --- acme.sh | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/acme.sh b/acme.sh index 83ad3d2a..c0f67841 100755 --- a/acme.sh +++ b/acme.sh @@ -587,9 +587,9 @@ _post() { _CURL="$CURL --dump-header $HTTP_HEADER " _debug "_CURL" "$_CURL" if [ "$needbase64" ] ; then - response="$($_CURL -A "User-Agent: $USER_AGENT" -X $httpmethod -H "$_H1" -H "$_H2" -H "$_H3" -H "$_H4" --data "$body" "$url" 2>"$HTTP_ERROR_FILE" | _base64)" + response="$($_CURL -A "User-Agent: $USER_AGENT" -X $httpmethod -H "$_H1" -H "$_H2" -H "$_H3" -H "$_H4" --data "$body" "$url" | _base64)" else - response="$($_CURL -A "User-Agent: $USER_AGENT" -X $httpmethod -H "$_H1" -H "$_H2" -H "$_H3" -H "$_H4" --data "$body" "$url" 2>"$HTTP_ERROR_FILE" )" + response="$($_CURL -A "User-Agent: $USER_AGENT" -X $httpmethod -H "$_H1" -H "$_H2" -H "$_H3" -H "$_H4" --data "$body" "$url" )" fi _ret="$?" else @@ -611,9 +611,6 @@ _post() { _sed_i "s/^ *//g" "$HTTP_HEADER" fi _debug "_ret" "$_ret" - if [ "$ret" != "0" ] ; then - _err "$(cat "$HTTP_ERROR_FILE")" - fi printf "%s" "$response" return $_ret } @@ -627,9 +624,9 @@ _get() { if _exists "curl" ; then _debug "CURL" "$CURL" if [ "$onlyheader" ] ; then - $CURL -I -A "User-Agent: $USER_AGENT" -H "$_H1" -H "$_H2" -H "$_H3" -H "$_H4" $url 2>"$HTTP_ERROR_FILE" + $CURL -I -A "User-Agent: $USER_AGENT" -H "$_H1" -H "$_H2" -H "$_H3" -H "$_H4" $url else - $CURL -A "User-Agent: $USER_AGENT" -H "$_H1" -H "$_H2" -H "$_H3" -H "$_H4" $url 2>"$HTTP_ERROR_FILE" + $CURL -A "User-Agent: $USER_AGENT" -H "$_H1" -H "$_H2" -H "$_H3" -H "$_H4" $url fi ret=$? else @@ -637,14 +634,11 @@ _get() { if [ "$onlyheader" ] ; then $WGET --user-agent="$USER_AGENT" --header "$_H4" --header "$_H3" --header "$_H2" --header "$_H1" -S -O /dev/null $url 2>&1 | sed 's/^[ ]*//g' else - $WGET --user-agent="$USER_AGENT" --header "$_H4" --header "$_H3" --header "$_H2" --header "$_H1" -O - $url 2>"$HTTP_ERROR_FILE" + $WGET --user-agent="$USER_AGENT" --header "$_H4" --header "$_H3" --header "$_H2" --header "$_H1" -O - $url fi ret=$? fi _debug "ret" "$ret" - if [ "$ret" != "0" ] ; then - _err "$(cat "$HTTP_ERROR_FILE")" - fi return $ret } @@ -881,7 +875,6 @@ _initpath() { fi HTTP_HEADER="$LE_WORKING_DIR/http.header" - HTTP_ERROR_FILE="$LE_WORKING_DIR/http.err" WGET="wget -q" if [ "$DEBUG" ] && [ "$DEBUG" -ge "2" ] ; then From bf233fbd48fd3258c4c978abbd000f847cb84c6a Mon Sep 17 00:00:00 2001 From: neil Date: Tue, 7 Jun 2016 13:05:27 +0800 Subject: [PATCH 4/5] minor --- dnsapi/dns_lexicon.sh | 40 ---------------------------------------- dnsapi/dns_myapi.sh | 26 ++++++++------------------ 2 files changed, 8 insertions(+), 58 deletions(-) diff --git a/dnsapi/dns_lexicon.sh b/dnsapi/dns_lexicon.sh index b5cb8a04..5e78a2d9 100755 --- a/dnsapi/dns_lexicon.sh +++ b/dnsapi/dns_lexicon.sh @@ -67,43 +67,3 @@ dns_lexicon_add() { - - - - - -#################### Private functions bellow ################################## - -_info() { - if [[ -z "$2" ]] ; then - echo "[$(date)] $1" - else - echo "[$(date)] $1"="'$2'" - fi -} - -_err() { - _info "$@" >&2 - return 1 -} - -_debug() { - if [[ -z "$DEBUG" ]] ; then - return - fi - _err "$@" - return 0 -} - -_debug2() { - if [[ "$DEBUG" -ge "2" ]] ; then - _debug "$@" - fi - return -} - - - - -#################### Private functions bellow ################################## - diff --git a/dnsapi/dns_myapi.sh b/dnsapi/dns_myapi.sh index f06cc1e6..a29b9ff1 100755 --- a/dnsapi/dns_myapi.sh +++ b/dnsapi/dns_myapi.sh @@ -2,15 +2,15 @@ #Here is a sample custom api script. #This file name is "dns_myapi.sh" -#So, here must be a method dns_myapi-add() +#So, here must be a method dns_myapi_add() #Which will be called by acme.sh to add the txt record to your api system. -#returns 0 meanst success, otherwise error. +#returns 0 means success, otherwise error. ######## Public functions ##################### -#Usage: add _acme-challenge.www.domain.com "XKrxpRBosdIKFzxW_CT3KLZNf6q0HG9i01zxXp5CPBs" +#Usage: dns_myapi_add _acme-challenge.www.domain.com "XKrxpRBosdIKFzxW_CT3KLZNf6q0HG9i01zxXp5CPBs" dns_myapi_add() { fulldomain=$1 txtvalue=$2 @@ -22,16 +22,12 @@ dns_myapi_add() { - - - #################### Private functions bellow ################################## - _info() { - if [[ -z "$2" ]] ; then + if [ -z "$2" ] ; then echo "[$(date)] $1" else - echo "[$(date)] $1"="'$2'" + echo "[$(date)] $1='$2'" fi } @@ -41,7 +37,7 @@ _err() { } _debug() { - if [[ -z "$DEBUG" ]] ; then + if [ -z "$DEBUG" ] ; then return fi _err "$@" @@ -49,14 +45,8 @@ _debug() { } _debug2() { - if [[ "$DEBUG" -ge "2" ]] ; then + if [ "$DEBUG" ] && [ "$DEBUG" -ge "2" ] ; then _debug "$@" fi return -} - - - - -#################### Private functions bellow ################################## - +} \ No newline at end of file From 900352521042b7c4f2532494052acf879a69399d Mon Sep 17 00:00:00 2001 From: Jeremy Fleischman Date: Mon, 6 Jun 2016 22:23:32 -0700 Subject: [PATCH 5/5] typo --- acme.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acme.sh b/acme.sh index c0f67841..a7032f7d 100755 --- a/acme.sh +++ b/acme.sh @@ -2030,7 +2030,7 @@ install() { _info "Installing to $LE_WORKING_DIR" if ! mkdir -p "$LE_WORKING_DIR" ; then - _err "Can not craete working dir: $LE_WORKING_DIR" + _err "Can not create working dir: $LE_WORKING_DIR" return 1 fi