Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
876df856
Commit
876df856
authored
Feb 02, 2016
by
neil
Browse files
Merge branch 'master' of
https://github.com/Neilpang/le
parents
9773342a
84e96d3f
Changes
3
Show whitespace changes
Inline
Side-by-side
README.md
View file @
876df856
...
@@ -11,6 +11,7 @@ Do NOT require to be `root/sudoer`.
...
@@ -11,6 +11,7 @@ Do NOT require to be `root/sudoer`.
#Tested OS
#Tested OS
1.
Ubuntu/Debian.
1.
Ubuntu/Debian.
2.
CentOS
2.
CentOS
3.
Windows (cygwin with curl, openssl and crontab included)
#Supported Mode
#Supported Mode
...
@@ -27,7 +28,7 @@ Do NOT require to be `root/sudoer`.
...
@@ -27,7 +28,7 @@ Do NOT require to be `root/sudoer`.
```
```
./le.sh install
./le.sh install
```
```
You don't have to be root then, altough it is recommended.
You don't have to be root then, alt
h
ough it is recommended.
Which does 3 jobs:
Which does 3 jobs:
*
create and copy
`le.sh`
to your home dir:
`~/.le`
*
create and copy
`le.sh`
to your home dir:
`~/.le`
...
@@ -44,7 +45,7 @@ root@v1:~# le.sh
...
@@ -44,7 +45,7 @@ root@v1:~# le.sh
https://github.com/Neilpang/le
https://github.com/Neilpang/le
v1.1.1
v1.1.1
Usage: le.sh [command] ...[args]....
Usage: le.sh [command] ...[args]....
Ava
l
ible commands:
Avai
la
ble commands:
install:
install:
Install le.sh to your system.
Install le.sh to your system.
...
@@ -105,7 +106,7 @@ The issued cert will be renewed every 80 days automatically.
...
@@ -105,7 +106,7 @@ The issued cert will be renewed every 80 days automatically.
# Install issued cert to apache/nginx etc.
# 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/apa
h
ce/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/apac
h
e/nginx "service apache2|nginx reload"
```
```
Install the issued cert/key to the production apache or nginx path.
Install the issued cert/key to the production apache or nginx path.
...
@@ -226,7 +227,7 @@ License is GPLv3
...
@@ -226,7 +227,7 @@ License is GPLv3
Please Star and Fork me.
Please Star and Fork me.
Issues and pullrequests are welcomed.
Issues and pull
requests are welcomed.
dnsapi/dns-myapi.sh
View file @
876df856
#!/bin/bash
#!/bin/bash
#Here is a sample custom api script.
#Here is a sample custom api script.
#This file name is "d
h
s-myapi.sh"
#This file name is "d
n
s-myapi.sh"
#So, here must be a method d
h
s-myapi-add()
#So, here must be a method d
n
s-myapi-add()
#Which will be called by le.sh to add the txt record to your api system.
#Which will be called by le.sh to add the txt record to your api system.
#returns 0 meanst success, otherwise error.
#returns 0 meanst success, otherwise error.
...
...
le.sh
View file @
876df856
#!/bin/bash
#!/bin/bash
VER
=
1.1.
3
VER
=
1.1.
4
PROJECT
=
"https://github.com/Neilpang/le"
PROJECT
=
"https://github.com/Neilpang/le"
DEFAULT_CA
=
"https://acme-v01.api.letsencrypt.org"
DEFAULT_CA
=
"https://acme-v01.api.letsencrypt.org"
...
@@ -294,6 +294,18 @@ _initpath() {
...
@@ -294,6 +294,18 @@ _initpath() {
fi
fi
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
"
$API
"
]
;
then
if
[
-z
"
$STAGE
"
]
;
then
if
[
-z
"
$STAGE
"
]
;
then
API
=
"
$DEFAULT_CA
"
API
=
"
$DEFAULT_CA
"
...
@@ -303,10 +315,6 @@ _initpath() {
...
@@ -303,10 +315,6 @@ _initpath() {
fi
fi
fi
fi
if
[
-z
"
$LE_WORKING_DIR
"
]
;
then
LE_WORKING_DIR
=
$HOME
/.le
fi
if
[
-z
"
$ACME_DIR
"
]
;
then
if
[
-z
"
$ACME_DIR
"
]
;
then
ACME_DIR
=
"/home/.acme"
ACME_DIR
=
"/home/.acme"
fi
fi
...
@@ -322,13 +330,7 @@ _initpath() {
...
@@ -322,13 +330,7 @@ _initpath() {
ACCOUNT_KEY_PATH
=
"
$LE_WORKING_DIR
/account.key"
ACCOUNT_KEY_PATH
=
"
$LE_WORKING_DIR
/account.key"
fi
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
if
[
-z
"
$domain
"
]
;
then
return
0
return
0
...
@@ -829,7 +831,7 @@ issue() {
...
@@ -829,7 +831,7 @@ issue() {
if
[
-z
"
$Le_LinkCert
"
]
;
then
if
[
-z
"
$Le_LinkCert
"
]
;
then
response
=
"
$(
echo
$response
| openssl
base64
-d
)
"
response
=
"
$(
echo
$response
| openssl
base64
-d
)
"
_err
"Sign failed:
$(
echo
"
$response
"
|
grep
-o
'"detail":"[^"]*"'
)
"
_err
"Sign failed:
$response
"
return
1
return
1
fi
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment