Browse Source

Add --cert-name option

pull/4380/head
nichivo 2 years ago
parent
commit
f75e4d7db8
  1. 30
      acme.sh

30
acme.sh

@ -2827,9 +2827,15 @@ _initpath() {
return 0 return 0
fi fi
if [ -z "$_certname" ]; then
CERT_NAME="$domain"
else
CERT_NAME="$_certname"
fi
if [ -z "$DOMAIN_PATH" ]; then if [ -z "$DOMAIN_PATH" ]; then
domainhome="$CERT_HOME/$domain"
domainhomeecc="$CERT_HOME/$domain$ECC_SUFFIX"
domainhome="$CERT_HOME/$CERT_NAME"
domainhomeecc="$CERT_HOME/$CERT_NAME$ECC_SUFFIX"
DOMAIN_PATH="$domainhome" DOMAIN_PATH="$domainhome"
@ -2848,21 +2854,21 @@ _initpath() {
fi fi
if [ -z "$DOMAIN_CONF" ]; then if [ -z "$DOMAIN_CONF" ]; then
DOMAIN_CONF="$DOMAIN_PATH/$domain.conf"
DOMAIN_CONF="$DOMAIN_PATH/$CERT_NAME.conf"
fi fi
if [ -z "$DOMAIN_SSL_CONF" ]; then if [ -z "$DOMAIN_SSL_CONF" ]; then
DOMAIN_SSL_CONF="$DOMAIN_PATH/$domain.csr.conf"
DOMAIN_SSL_CONF="$DOMAIN_PATH/$CERT_NAME.csr.conf"
fi fi
if [ -z "$CSR_PATH" ]; then if [ -z "$CSR_PATH" ]; then
CSR_PATH="$DOMAIN_PATH/$domain.csr"
CSR_PATH="$DOMAIN_PATH/$CERT_NAME.csr"
fi fi
if [ -z "$CERT_KEY_PATH" ]; then if [ -z "$CERT_KEY_PATH" ]; then
CERT_KEY_PATH="$DOMAIN_PATH/$domain.key"
CERT_KEY_PATH="$DOMAIN_PATH/$CERT_NAME.key"
fi fi
if [ -z "$CERT_PATH" ]; then if [ -z "$CERT_PATH" ]; then
CERT_PATH="$DOMAIN_PATH/$domain.cer"
CERT_PATH="$DOMAIN_PATH/$CERT_NAME.cer"
fi fi
if [ -z "$CA_CERT_PATH" ]; then if [ -z "$CA_CERT_PATH" ]; then
CA_CERT_PATH="$DOMAIN_PATH/ca.cer" CA_CERT_PATH="$DOMAIN_PATH/ca.cer"
@ -2871,10 +2877,10 @@ _initpath() {
CERT_FULLCHAIN_PATH="$DOMAIN_PATH/fullchain.cer" CERT_FULLCHAIN_PATH="$DOMAIN_PATH/fullchain.cer"
fi fi
if [ -z "$CERT_PFX_PATH" ]; then if [ -z "$CERT_PFX_PATH" ]; then
CERT_PFX_PATH="$DOMAIN_PATH/$domain.pfx"
CERT_PFX_PATH="$DOMAIN_PATH/$CERT_NAME.pfx"
fi fi
if [ -z "$CERT_PKCS8_PATH" ]; then if [ -z "$CERT_PKCS8_PATH" ]; then
CERT_PKCS8_PATH="$DOMAIN_PATH/$domain.pkcs8"
CERT_PKCS8_PATH="$DOMAIN_PATH/$CERT_NAME.pkcs8"
fi fi
if [ -z "$TLS_CONF" ]; then if [ -z "$TLS_CONF" ]; then
@ -6898,6 +6904,7 @@ Parameters:
--accountconf <file> Specifies a customized account config file. --accountconf <file> Specifies a customized account config file.
--home <directory> Specifies the home dir for $PROJECT_NAME. --home <directory> Specifies the home dir for $PROJECT_NAME.
--cert-home <directory> Specifies the home dir to save all the certs, only valid for '--install' command. --cert-home <directory> Specifies the home dir to save all the certs, only valid for '--install' command.
--cert-name <name> Specifies the name of the dir and base filenames of the certs, only valid for '--issue' command.
--config-home <directory> Specifies the home dir to save all the configurations. --config-home <directory> Specifies the home dir to save all the configurations.
--useragent <string> Specifies the user agent string. it will be saved for future use too. --useragent <string> Specifies the user agent string. it will be saved for future use too.
-m, --email <email> Specifies the account email, only valid for the '--install' and '--update-account' command. -m, --email <email> Specifies the account email, only valid for the '--install' and '--update-account' command.
@ -7185,6 +7192,7 @@ _process() {
_accountemail="" _accountemail=""
_accountkey="" _accountkey=""
_certhome="" _certhome=""
_certname=""
_confighome="" _confighome=""
_httpport="" _httpport=""
_tlsport="" _tlsport=""
@ -7504,6 +7512,10 @@ _process() {
export CERT_HOME="$_certhome" export CERT_HOME="$_certhome"
shift shift
;; ;;
--cert-name | --certname)
_certname="$2"
shift
;;
--config-home) --config-home)
_confighome="$2" _confighome="$2"
export LE_CONFIG_HOME="$_confighome" export LE_CONFIG_HOME="$_confighome"

Loading…
Cancel
Save