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
fc63445c
Unverified
Commit
fc63445c
authored
Aug 22, 2020
by
neil
Committed by
GitHub
Aug 22, 2020
Browse files
Merge pull request #3126 from acmesh-official/dev
Sync
parents
08c210d8
0c156555
Changes
3
Hide whitespace changes
Inline
Side-by-side
.github/workflows/shellcheck.yml
View file @
fc63445c
name
:
s
hellcheck
name
:
S
hellcheck
on
:
[
push
,
pull_request
]
jobs
:
...
...
README.md
View file @
fc63445c
# An ACME Shell script: acme.sh
[

](https://travis-ci.org/acmesh-official/acme.sh)




<a
href=
"https://opencollective.com/acmesh"
alt=
"Financial Contributors on Open Collective"
><img
src=
"https://opencollective.com/acmesh/all/badge.svg?label=financial+contributors"
/></a>
...
...
acme.sh
View file @
fc63445c
...
...
@@ -1375,7 +1375,7 @@ toPkcs() {
domain
=
"
$1
"
pfxPassword
=
"
$2
"
if
[
-z
"
$domain
"
]
;
then
_usage
"Usage:
$PROJECT_ENTRY
--to
P
kcs
-d
domain [--password
pfx-
password]"
_usage
"Usage:
$PROJECT_ENTRY
--to
-p
kcs
12 --domain <
domain
.tld>
[--password
<
password
>] [--ecc
]"
return
1
fi
...
...
@@ -1396,7 +1396,7 @@ toPkcs8() {
domain
=
"
$1
"
if
[
-z
"
$domain
"
]
;
then
_usage
"Usage:
$PROJECT_ENTRY
--to
P
kcs8 -d
domain [--ecc]"
_usage
"Usage:
$PROJECT_ENTRY
--to
-p
kcs8
-
-d
omain <
domain
.tld>
[--ecc]"
return
1
fi
...
...
@@ -1416,7 +1416,7 @@ toPkcs8() {
createAccountKey
()
{
_info
"Creating account key"
if
[
-z
"
$1
"
]
;
then
_usage
"Usage:
$PROJECT_ENTRY
--create
A
ccount
K
ey --accountkeylength
2048
"
_usage
"Usage:
$PROJECT_ENTRY
--create
-a
ccount
-k
ey
[
--accountkeylength
<bits>]
"
return
fi
...
...
@@ -1459,7 +1459,7 @@ _create_account_key() {
createDomainKey
()
{
_info
"Creating domain key"
if
[
-z
"
$1
"
]
;
then
_usage
"Usage:
$PROJECT_ENTRY
--create
D
omain
K
ey -
d
domain.
com
[
--keylength
2048
]"
_usage
"Usage:
$PROJECT_ENTRY
--create
-d
omain
-k
ey -
-domain <
domain.
tld>
[--keylength
<bits>
]"
return
fi
...
...
@@ -1499,7 +1499,7 @@ createDomainKey() {
createCSR
()
{
_info
"Creating csr"
if
[
-z
"
$1
"
]
;
then
_usage
"Usage:
$PROJECT_ENTRY
--create
CSR -d
domain
1.com
[-
d
domain
2.com -d domain3.com
...
]"
_usage
"Usage:
$PROJECT_ENTRY
--create
-csr --domain <
domain
.tld>
[-
-
domain
<domain2.tld>
...]"
return
fi
...
...
@@ -2888,7 +2888,7 @@ Allow from all
if
_restoreApache
;
then
_err
"The apache config file is restored."
else
_err
"Sorry,
T
he apache config file can not be restored, please report bug."
_err
"Sorry,
t
he apache config file can not be restored, please report bug."
fi
return
1
fi
...
...
@@ -4012,7 +4012,7 @@ _match_issuer() {
#webroot, domain domainlist keylength
issue
()
{
if
[
-z
"
$2
"
]
;
then
_usage
"Usage:
$PROJECT_ENTRY
--issue
-d
a.com -w /path/to/webroot/a.com/
"
_usage
"Usage:
$PROJECT_ENTRY
--issue
-
-d
omain <domain.tld> --webroot <directory>
"
return
1
fi
if
[
-z
"
$1
"
]
;
then
...
...
@@ -4993,7 +4993,7 @@ _split_cert_chain() {
renew
()
{
Le_Domain
=
"
$1
"
if
[
-z
"
$Le_Domain
"
]
;
then
_usage
"Usage:
$PROJECT_ENTRY
--renew
-d
domain.
com
[--ecc]"
_usage
"Usage:
$PROJECT_ENTRY
--renew
-
-d
omain <
domain.
tld>
[--ecc]"
return
1
fi
...
...
@@ -5003,7 +5003,7 @@ renew() {
_info
"
$(
__green
"Renew: '
$Le_Domain
'"
)
"
if
[
!
-f
"
$DOMAIN_CONF
"
]
;
then
_info
"'
$Le_Domain
' is not a issued domain, skip."
_info
"'
$Le_Domain
' is not a
n
issued domain, skip."
return
$RENEW_SKIP
fi
...
...
@@ -5082,7 +5082,7 @@ renewAll() {
for
di
in
"
${
CERT_HOME
}
"
/
*
.
*
/
;
do
_debug di
"
$di
"
if
!
[
-d
"
$di
"
]
;
then
_debug
"Not directory, skip:
$di
"
_debug
"Not
a
directory, skip:
$di
"
continue
fi
d
=
$(
basename
"
$di
"
)
...
...
@@ -5185,7 +5185,7 @@ signcsr() {
_csrfile
=
"
$1
"
_csrW
=
"
$2
"
if
[
-z
"
$_csrfile
"
]
||
[
-z
"
$_csrW
"
]
;
then
_usage
"Usage:
$PROJECT_ENTRY
--signcsr
--csr
my
csr
.csr -w /path/to/webroot/a.com/
"
_usage
"Usage:
$PROJECT_ENTRY
--sign
-
csr --csr
<
csr
-file> --webroot <directory>
"
return
1
fi
...
...
@@ -5253,7 +5253,7 @@ showcsr() {
_csrfile
=
"
$1
"
_csrd
=
"
$2
"
if
[
-z
"
$_csrfile
"
]
&&
[
-z
"
$_csrd
"
]
;
then
_usage
"Usage:
$PROJECT_ENTRY
--showcsr
--csr
my
csr
.csr
"
_usage
"Usage:
$PROJECT_ENTRY
--show
-
csr --csr
<
csr
-file>
"
return
1
fi
...
...
@@ -5370,7 +5370,7 @@ deploy() {
_hooks
=
"
$2
"
_isEcc
=
"
$3
"
if
[
-z
"
$_hooks
"
]
;
then
_usage
"Usage:
$PROJECT_ENTRY
--deploy -
d
domain.
com
--deploy-hook
cpanel
[--ecc] "
_usage
"Usage:
$PROJECT_ENTRY
--deploy -
-domain <
domain.
tld>
--deploy-hook
<hookname>
[--ecc] "
return
1
fi
...
...
@@ -5391,7 +5391,7 @@ deploy() {
installcert
()
{
_main_domain
=
"
$1
"
if
[
-z
"
$_main_domain
"
]
;
then
_usage
"Usage:
$PROJECT_ENTRY
--installcert -
d
domain.
com
[--ecc] [--cert-file
cert-file-path] [--key-file key-file-path] [--ca-file ca-cert-file-path]
[ --reload
C
md
reloadCmd
] [--fullchain-file
fullchain-path
]"
_usage
"Usage:
$PROJECT_ENTRY
--install
-
cert -
-domain <
domain.
tld>
[--ecc] [--cert-file
<file>] [--key-file <file>] [--ca-file <file>]
[ --reload
c
md
<command>
] [--fullchain-file
<file>
]"
return
1
fi
...
...
@@ -5670,7 +5670,7 @@ uninstallcronjob() {
revoke
()
{
Le_Domain
=
"
$1
"
if
[
-z
"
$Le_Domain
"
]
;
then
_usage
"Usage:
$PROJECT_ENTRY
--revoke -
d
domain.
com
[--ecc]"
_usage
"Usage:
$PROJECT_ENTRY
--revoke -
-domain <
domain.
tld>
[--ecc]"
return
1
fi
...
...
@@ -5741,7 +5741,7 @@ revoke() {
remove
()
{
Le_Domain
=
"
$1
"
if
[
-z
"
$Le_Domain
"
]
;
then
_usage
"Usage:
$PROJECT_ENTRY
--remove -
d
domain.
com
[--ecc]"
_usage
"Usage:
$PROJECT_ENTRY
--remove -
-domain <
domain.
tld>
[--ecc]"
return
1
fi
...
...
@@ -5901,7 +5901,7 @@ deactivate() {
_initAPI
_debug _d_domain_list
"
$_d_domain_list
"
if
[
-z
"
$(
echo
$_d_domain_list
|
cut
-d
,
-f
1
)
"
]
;
then
_usage
"Usage:
$PROJECT_ENTRY
--deactivate -
d
domain.
com
[-d
domain.com
]"
_usage
"Usage:
$PROJECT_ENTRY
--deactivate -
-domain <
domain.
tld>
[-
-
d
omain <domain2.tld> ...
]"
return
1
fi
for
_d_dm
in
$(
echo
"
$_d_domain_list
"
|
tr
','
' '
)
;
do
...
...
@@ -6361,7 +6361,7 @@ setnotify() {
_initpath
if
[
-z
"
$_nhook$_nlevel$_nmode
"
]
;
then
_usage
"Usage:
$PROJECT_ENTRY
--set-notify [--notify-hook
mailgun
] [--notify-level
$NOTIFY_LEVEL_DEFAULT
] [--notify-mode
$NOTIFY_MODE_DEFAULT
]"
_usage
"Usage:
$PROJECT_ENTRY
--set-notify [--notify-hook
<hookname>
] [--notify-level
<0|1|2|3>] [--notify-mode <0|1>
]"
_usage
"
$_NOTIFY_WIKI
"
return
1
fi
...
...
@@ -6400,7 +6400,7 @@ setnotify() {
showhelp
()
{
_initpath
version
echo
"Usage:
$PROJECT_ENTRY
command ...[parameters
]
...
.
echo
"Usage:
$PROJECT_ENTRY
<
command
>
...
[parameters
...
]
Commands:
-h, --help Show this help message.
-v, --version Show version info.
...
...
@@ -6503,7 +6503,7 @@ Parameters:
--noprofile Only valid for '--install' command, which means: do not install aliases to user profile.
--no-color Do not output color text.
--force-color Force output of color text. Useful for non-interactive use with the aha tool for HTML E-Mails.
--ecc Specifies to use the ECC cert. Valid for '--install-cert', '--renew', '--revoke', '--to
P
kcs' and '--create
CSR
'
--ecc Specifies to use the ECC cert. Valid for '--install-cert', '--renew', '--revoke', '--to
-p
kcs
12
' and '--create
-csr
'
--csr <file> Specifies the input csr.
--pre-hook <command> Command to be run before obtaining any certificates.
--post-hook <command> Command to be run after attempting to obtain/renew certificates. Runs regardless of whether obtain/renew succeeded or failed.
...
...
@@ -6532,6 +6532,8 @@ Parameters:
--revoke-reason <0-10> The reason for revocation, can be used in conjunction with the '--revoke' command.
See:
$_REVOKE_WIKI
--password <password> Add a password to exported pfx file. Use with --to-pkcs12.
"
}
...
...
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