mirror of
https://github.com/plantroon/acme.sh.git
synced 2024-12-26 23:11:44 +00:00
Merge pull request #3125 from lcts/usage-cleanup
Update individual 'Usage: ...'-messages to match showhelp()
This commit is contained in:
commit
0c15655574
42
acme.sh
42
acme.sh
@ -1375,7 +1375,7 @@ toPkcs() {
|
|||||||
domain="$1"
|
domain="$1"
|
||||||
pfxPassword="$2"
|
pfxPassword="$2"
|
||||||
if [ -z "$domain" ]; then
|
if [ -z "$domain" ]; then
|
||||||
_usage "Usage: $PROJECT_ENTRY --toPkcs -d domain [--password pfx-password]"
|
_usage "Usage: $PROJECT_ENTRY --to-pkcs12 --domain <domain.tld> [--password <password>] [--ecc]"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -1396,7 +1396,7 @@ toPkcs8() {
|
|||||||
domain="$1"
|
domain="$1"
|
||||||
|
|
||||||
if [ -z "$domain" ]; then
|
if [ -z "$domain" ]; then
|
||||||
_usage "Usage: $PROJECT_ENTRY --toPkcs8 -d domain [--ecc]"
|
_usage "Usage: $PROJECT_ENTRY --to-pkcs8 --domain <domain.tld> [--ecc]"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -1416,7 +1416,7 @@ toPkcs8() {
|
|||||||
createAccountKey() {
|
createAccountKey() {
|
||||||
_info "Creating account key"
|
_info "Creating account key"
|
||||||
if [ -z "$1" ]; then
|
if [ -z "$1" ]; then
|
||||||
_usage "Usage: $PROJECT_ENTRY --createAccountKey --accountkeylength 2048"
|
_usage "Usage: $PROJECT_ENTRY --create-account-key [--accountkeylength <bits>]"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -1459,7 +1459,7 @@ _create_account_key() {
|
|||||||
createDomainKey() {
|
createDomainKey() {
|
||||||
_info "Creating domain key"
|
_info "Creating domain key"
|
||||||
if [ -z "$1" ]; then
|
if [ -z "$1" ]; then
|
||||||
_usage "Usage: $PROJECT_ENTRY --createDomainKey -d domain.com [ --keylength 2048 ]"
|
_usage "Usage: $PROJECT_ENTRY --create-domain-key --domain <domain.tld> [--keylength <bits>]"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -1499,7 +1499,7 @@ createDomainKey() {
|
|||||||
createCSR() {
|
createCSR() {
|
||||||
_info "Creating csr"
|
_info "Creating csr"
|
||||||
if [ -z "$1" ]; then
|
if [ -z "$1" ]; then
|
||||||
_usage "Usage: $PROJECT_ENTRY --createCSR -d domain1.com [-d domain2.com -d domain3.com ... ]"
|
_usage "Usage: $PROJECT_ENTRY --create-csr --domain <domain.tld> [--domain <domain2.tld> ...]"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -2888,7 +2888,7 @@ Allow from all
|
|||||||
if _restoreApache; then
|
if _restoreApache; then
|
||||||
_err "The apache config file is restored."
|
_err "The apache config file is restored."
|
||||||
else
|
else
|
||||||
_err "Sorry, The apache config file can not be restored, please report bug."
|
_err "Sorry, the apache config file can not be restored, please report bug."
|
||||||
fi
|
fi
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
@ -4012,7 +4012,7 @@ _match_issuer() {
|
|||||||
#webroot, domain domainlist keylength
|
#webroot, domain domainlist keylength
|
||||||
issue() {
|
issue() {
|
||||||
if [ -z "$2" ]; then
|
if [ -z "$2" ]; then
|
||||||
_usage "Usage: $PROJECT_ENTRY --issue -d a.com -w /path/to/webroot/a.com/ "
|
_usage "Usage: $PROJECT_ENTRY --issue --domain <domain.tld> --webroot <directory>"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
if [ -z "$1" ]; then
|
if [ -z "$1" ]; then
|
||||||
@ -4993,7 +4993,7 @@ _split_cert_chain() {
|
|||||||
renew() {
|
renew() {
|
||||||
Le_Domain="$1"
|
Le_Domain="$1"
|
||||||
if [ -z "$Le_Domain" ]; then
|
if [ -z "$Le_Domain" ]; then
|
||||||
_usage "Usage: $PROJECT_ENTRY --renew -d domain.com [--ecc]"
|
_usage "Usage: $PROJECT_ENTRY --renew --domain <domain.tld> [--ecc]"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -5003,7 +5003,7 @@ renew() {
|
|||||||
|
|
||||||
_info "$(__green "Renew: '$Le_Domain'")"
|
_info "$(__green "Renew: '$Le_Domain'")"
|
||||||
if [ ! -f "$DOMAIN_CONF" ]; then
|
if [ ! -f "$DOMAIN_CONF" ]; then
|
||||||
_info "'$Le_Domain' is not a issued domain, skip."
|
_info "'$Le_Domain' is not an issued domain, skip."
|
||||||
return $RENEW_SKIP
|
return $RENEW_SKIP
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -5082,7 +5082,7 @@ renewAll() {
|
|||||||
for di in "${CERT_HOME}"/*.*/; do
|
for di in "${CERT_HOME}"/*.*/; do
|
||||||
_debug di "$di"
|
_debug di "$di"
|
||||||
if ! [ -d "$di" ]; then
|
if ! [ -d "$di" ]; then
|
||||||
_debug "Not directory, skip: $di"
|
_debug "Not a directory, skip: $di"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
d=$(basename "$di")
|
d=$(basename "$di")
|
||||||
@ -5185,7 +5185,7 @@ signcsr() {
|
|||||||
_csrfile="$1"
|
_csrfile="$1"
|
||||||
_csrW="$2"
|
_csrW="$2"
|
||||||
if [ -z "$_csrfile" ] || [ -z "$_csrW" ]; then
|
if [ -z "$_csrfile" ] || [ -z "$_csrW" ]; then
|
||||||
_usage "Usage: $PROJECT_ENTRY --signcsr --csr mycsr.csr -w /path/to/webroot/a.com/ "
|
_usage "Usage: $PROJECT_ENTRY --sign-csr --csr <csr-file> --webroot <directory>"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -5253,7 +5253,7 @@ showcsr() {
|
|||||||
_csrfile="$1"
|
_csrfile="$1"
|
||||||
_csrd="$2"
|
_csrd="$2"
|
||||||
if [ -z "$_csrfile" ] && [ -z "$_csrd" ]; then
|
if [ -z "$_csrfile" ] && [ -z "$_csrd" ]; then
|
||||||
_usage "Usage: $PROJECT_ENTRY --showcsr --csr mycsr.csr"
|
_usage "Usage: $PROJECT_ENTRY --show-csr --csr <csr-file>"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -5370,7 +5370,7 @@ deploy() {
|
|||||||
_hooks="$2"
|
_hooks="$2"
|
||||||
_isEcc="$3"
|
_isEcc="$3"
|
||||||
if [ -z "$_hooks" ]; then
|
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
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -5391,7 +5391,7 @@ deploy() {
|
|||||||
installcert() {
|
installcert() {
|
||||||
_main_domain="$1"
|
_main_domain="$1"
|
||||||
if [ -z "$_main_domain" ]; then
|
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] [ --reloadCmd reloadCmd] [--fullchain-file fullchain-path]"
|
_usage "Usage: $PROJECT_ENTRY --install-cert --domain <domain.tld> [--ecc] [--cert-file <file>] [--key-file <file>] [--ca-file <file>] [ --reloadcmd <command>] [--fullchain-file <file>]"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -5670,7 +5670,7 @@ uninstallcronjob() {
|
|||||||
revoke() {
|
revoke() {
|
||||||
Le_Domain="$1"
|
Le_Domain="$1"
|
||||||
if [ -z "$Le_Domain" ]; then
|
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
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -5741,7 +5741,7 @@ revoke() {
|
|||||||
remove() {
|
remove() {
|
||||||
Le_Domain="$1"
|
Le_Domain="$1"
|
||||||
if [ -z "$Le_Domain" ]; then
|
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
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -5901,7 +5901,7 @@ deactivate() {
|
|||||||
_initAPI
|
_initAPI
|
||||||
_debug _d_domain_list "$_d_domain_list"
|
_debug _d_domain_list "$_d_domain_list"
|
||||||
if [ -z "$(echo $_d_domain_list | cut -d , -f 1)" ]; then
|
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> [--domain <domain2.tld> ...]"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
for _d_dm in $(echo "$_d_domain_list" | tr ',' ' '); do
|
for _d_dm in $(echo "$_d_domain_list" | tr ',' ' '); do
|
||||||
@ -6361,7 +6361,7 @@ setnotify() {
|
|||||||
_initpath
|
_initpath
|
||||||
|
|
||||||
if [ -z "$_nhook$_nlevel$_nmode" ]; then
|
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"
|
_usage "$_NOTIFY_WIKI"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
@ -6400,7 +6400,7 @@ setnotify() {
|
|||||||
showhelp() {
|
showhelp() {
|
||||||
_initpath
|
_initpath
|
||||||
version
|
version
|
||||||
echo "Usage: $PROJECT_ENTRY command ...[parameters]....
|
echo "Usage: $PROJECT_ENTRY <command> ... [parameters ...]
|
||||||
Commands:
|
Commands:
|
||||||
-h, --help Show this help message.
|
-h, --help Show this help message.
|
||||||
-v, --version Show version info.
|
-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.
|
--noprofile Only valid for '--install' command, which means: do not install aliases to user profile.
|
||||||
--no-color Do not output color text.
|
--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.
|
--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', '--toPkcs' and '--createCSR'
|
--ecc Specifies to use the ECC cert. Valid for '--install-cert', '--renew', '--revoke', '--to-pkcs12' and '--create-csr'
|
||||||
--csr <file> Specifies the input csr.
|
--csr <file> Specifies the input csr.
|
||||||
--pre-hook <command> Command to be run before obtaining any certificates.
|
--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.
|
--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.
|
--revoke-reason <0-10> The reason for revocation, can be used in conjunction with the '--revoke' command.
|
||||||
See: $_REVOKE_WIKI
|
See: $_REVOKE_WIKI
|
||||||
|
|
||||||
|
--password <password> Add a password to exported pfx file. Use with --to-pkcs12.
|
||||||
|
|
||||||
|
|
||||||
"
|
"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user