Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
94917d1e
Commit
94917d1e
authored
Feb 02, 2016
by
neil
Browse files
load account.conf at a earlier time, so that "STAGE" macro can be placed in the conf file.
parent
55ce1708
Changes
1
Hide whitespace changes
Inline
Side-by-side
le.sh
View file @
94917d1e
#!/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"
...
@@ -293,6 +293,18 @@ _initpath() {
...
@@ -293,6 +293,18 @@ _initpath() {
SUDO
=
sudo
SUDO
=
sudo
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
...
@@ -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