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
97e44b97
Commit
97e44b97
authored
Jan 06, 2016
by
neil
Browse files
add ca cert
parent
89a41e09
Changes
1
Show whitespace changes
Inline
Side-by-side
le.sh
View file @
97e44b97
...
@@ -259,13 +259,17 @@ _initpath() {
...
@@ -259,13 +259,17 @@ _initpath() {
#issue webroot a.com [www.a.com,b.com,c.com] [key-length] [cert-file-path] [key-file-path] [reloadCmd]
#issue webroot a.com [www.a.com,b.com,c.com] [key-length] [cert-file-path] [key-file-path] [reloadCmd]
issue
()
{
issue
()
{
if
[
-z
"
$1
"
]
;
then
if
[
-z
"
$1
"
]
;
then
echo
"Usage:
$0
webroot a.com [www.a.com,b.com,c.com] [key-length] [cert-file-path] [key-file-path] [reloadCmd]"
echo
"Usage:
$0
webroot a.com [www.a.com,b.com,c.com] [key-length] [cert-file-path] [key-file-path]
[ca-cert-file-path]
[reloadCmd]"
return
1
return
1
fi
fi
Le_Webroot
=
$1
Le_Webroot
=
$1
Le_Domain
=
$2
Le_Domain
=
$2
Le_Alt
=
$3
Le_Alt
=
$3
Le_Keylength
=
$4
Le_Keylength
=
$4
Le_RealCertPath
=
$5
Le_RealKeyPath
=
$6
Le_RealCACertPath
=
$7
Le_ReloadCmd
=
$8
if
[
-z
"
$Le_Domain
"
]
;
then
if
[
-z
"
$Le_Domain
"
]
;
then
Le_Domain
=
"
$1
"
Le_Domain
=
"
$1
"
...
@@ -285,6 +289,21 @@ issue() {
...
@@ -285,6 +289,21 @@ issue() {
if
[
"
$Le_Alt
"
==
"no"
]
;
then
if
[
"
$Le_Alt
"
==
"no"
]
;
then
Le_Alt
=
""
Le_Alt
=
""
fi
fi
if
[
"
$Le_Keylength
"
==
"no"
]
;
then
Le_Keylength
=
""
fi
if
[
"
$Le_RealCertPath
"
==
"no"
]
;
then
Le_RealCertPath
=
""
fi
if
[
"
$Le_RealKeyPath
"
==
"no"
]
;
then
Le_RealKeyPath
=
""
fi
if
[
"
$Le_RealCACertPath
"
==
"no"
]
;
then
Le_RealCACertPath
=
""
fi
if
[
"
$Le_ReloadCmd
"
==
"no"
]
;
then
Le_ReloadCmd
=
""
fi
if
[
"
$Le_Webroot
"
==
"no"
]
;
then
if
[
"
$Le_Webroot
"
==
"no"
]
;
then
_info
"Standalone mode."
_info
"Standalone mode."
...
@@ -505,6 +524,14 @@ issue() {
...
@@ -505,6 +524,14 @@ issue() {
fi
fi
_setopt
$DOMAIN_CONF
"Le_RealCACertPath"
"="
"
\"
$Le_RealCACertPath
\"
"
if
[
"
$Le_RealCACertPath
"
]
;
then
if
[
-f
"
$Le_RealCACertPath
"
]
;
then
rm
-f
$Le_RealCACertPath
fi
ln
-s
$CA_CERT_PATH
$Le_RealCACertPath
fi
_setopt
$DOMAIN_CONF
"Le_RealKeyPath"
"="
"
\"
$Le_RealKeyPath
\"
"
_setopt
$DOMAIN_CONF
"Le_RealKeyPath"
"="
"
\"
$Le_RealKeyPath
\"
"
if
[
"
$Le_RealKeyPath
"
]
;
then
if
[
"
$Le_RealKeyPath
"
]
;
then
if
[
-f
"
$Le_RealKeyPath
"
]
;
then
if
[
-f
"
$Le_RealKeyPath
"
]
;
then
...
@@ -555,6 +582,8 @@ renewAll() {
...
@@ -555,6 +582,8 @@ renewAll() {
Le_RealCertPath
=
""
Le_RealCertPath
=
""
Le_RealKeyPath
=
""
Le_RealKeyPath
=
""
Le_RealCACertPath
=
""
Le_ReloadCmd
=
""
Le_ReloadCmd
=
""
renew
"
$d
"
renew
"
$d
"
...
...
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