From 94917d1e0b969b7d1f6f95f126affc08ac825861 Mon Sep 17 00:00:00 2001 From: neil Date: Tue, 2 Feb 2016 13:05:54 +0800 Subject: [PATCH 1/5] load account.conf at a earlier time, so that "STAGE" macro can be placed in the conf file. --- le.sh | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/le.sh b/le.sh index 52cb4c6e..6603c3c6 100755 --- a/le.sh +++ b/le.sh @@ -1,5 +1,5 @@ #!/bin/bash -VER=1.1.3 +VER=1.1.4 PROJECT="https://github.com/Neilpang/le" DEFAULT_CA="https://acme-v01.api.letsencrypt.org" @@ -293,6 +293,18 @@ _initpath() { SUDO=sudo fi fi + + if [ -z "$LE_WORKING_DIR" ]; then + LE_WORKING_DIR=$HOME/.le + fi + + if [ -z "$ACCOUNT_CONF_PATH" ] ; then + ACCOUNT_CONF_PATH="$LE_WORKING_DIR/account.conf" + fi + + if [ -f "$ACCOUNT_CONF_PATH" ] ; then + source "$ACCOUNT_CONF_PATH" + fi if [ -z "$API" ] ; then if [ -z "$STAGE" ] ; then @@ -303,10 +315,6 @@ _initpath() { fi fi - if [ -z "$LE_WORKING_DIR" ]; then - LE_WORKING_DIR=$HOME/.le - fi - if [ -z "$ACME_DIR" ] ; then ACME_DIR="/home/.acme" fi @@ -322,13 +330,7 @@ _initpath() { ACCOUNT_KEY_PATH="$LE_WORKING_DIR/account.key" fi - if [ -z "$ACCOUNT_CONF_PATH" ] ; then - ACCOUNT_CONF_PATH="$LE_WORKING_DIR/account.conf" - fi - - if [ -f "$ACCOUNT_CONF_PATH" ] ; then - source "$ACCOUNT_CONF_PATH" - fi + if [ -z "$domain" ] ; then return 0 @@ -829,7 +831,7 @@ issue() { if [ -z "$Le_LinkCert" ] ; then response="$(echo $response | openssl base64 -d)" - _err "Sign failed: $(echo "$response" | grep -o '"detail":"[^"]*"')" + _err "Sign failed: $response" return 1 fi From 4e76098bdc83c83a3016467c8bed853f9d5266e6 Mon Sep 17 00:00:00 2001 From: Neil Date: Tue, 2 Feb 2016 13:08:41 +0800 Subject: [PATCH 2/5] Support Windows --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index f9ab7311..98c5953e 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ Do NOT require to be `root/sudoer`. #Tested OS 1. Ubuntu/Debian. 2. CentOS +3. Windows (cygwin with curl, openssl and crontab included) #Supported Mode From 36d5db158a7ff6cd79fd1ffc91d30cc91648ab79 Mon Sep 17 00:00:00 2001 From: Neil Date: Tue, 2 Feb 2016 13:49:09 +0800 Subject: [PATCH 3/5] typos --- dnsapi/dns-myapi.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dnsapi/dns-myapi.sh b/dnsapi/dns-myapi.sh index 463a44c9..af7dda7a 100644 --- a/dnsapi/dns-myapi.sh +++ b/dnsapi/dns-myapi.sh @@ -1,8 +1,8 @@ #!/bin/bash #Here is a sample custom api script. -#This file name is "dhs-myapi.sh" -#So, here must be a method dhs-myapi-add() +#This file name is "dns-myapi.sh" +#So, here must be a method dns-myapi-add() #Which will be called by le.sh to add the txt record to your api system. #returns 0 meanst success, otherwise error. From d0064bc30e83dbe45a8b1e80080b469573ebe9f1 Mon Sep 17 00:00:00 2001 From: dawsonbotsford Date: Tue, 2 Feb 2016 00:34:56 -0700 Subject: [PATCH 4/5] Spelling correction automated from the Spelling Bee --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 98c5953e..f7b89cca 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ Do NOT require to be `root/sudoer`. ``` ./le.sh install ``` -You don't have to be root then, altough it is recommended. +You don't have to be root then, although it is recommended. Which does 3 jobs: * create and copy `le.sh` to your home dir: `~/.le` @@ -45,7 +45,7 @@ root@v1:~# le.sh https://github.com/Neilpang/le v1.1.1 Usage: le.sh [command] ...[args].... -Avalible commands: +Available commands: install: Install le.sh to your system. @@ -106,7 +106,7 @@ The issued cert will be renewed every 80 days automatically. # Install issued cert to apache/nginx etc. ``` -le installcert aa.com /path/to/certfile/in/apache/nginx /path/to/keyfile/in/apache/nginx /path/to/ca/certfile/apahce/nginx "service apache2|nginx reload" +le installcert aa.com /path/to/certfile/in/apache/nginx /path/to/keyfile/in/apache/nginx /path/to/ca/certfile/apache/nginx "service apache2|nginx reload" ``` Install the issued cert/key to the production apache or nginx path. From 18ab2c5c5b3491ad8105de163079b0e9f58d4353 Mon Sep 17 00:00:00 2001 From: Dawson Botsford Date: Tue, 2 Feb 2016 00:36:43 -0700 Subject: [PATCH 5/5] Manual spacing fix --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f7b89cca..42fb6743 100644 --- a/README.md +++ b/README.md @@ -227,7 +227,7 @@ License is GPLv3 Please Star and Fork me. -Issues and pullrequests are welcomed. +Issues and pull requests are welcomed.