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
c39e6c44
Commit
c39e6c44
authored
Jan 03, 2022
by
neilpang
Committed by
neil
Jan 06, 2022
Browse files
add `--info` command to show the global configs or domain configs.
https://github.com/acmesh-official/acme.sh/issues/2444
parent
1566656a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Dockerfile
View file @
c39e6c44
...
@@ -40,6 +40,7 @@ RUN for verb in help \
...
@@ -40,6 +40,7 @@ RUN for verb in help \
revoke
\
revoke
\
remove
\
remove
\
list
\
list
\
info
\
showcsr
\
showcsr
\
install-cronjob
\
install-cronjob
\
uninstall-cronjob
\
uninstall-cronjob
\
...
...
acme.sh
View file @
c39e6c44
...
@@ -144,6 +144,8 @@ NOTIFY_MODE_CERT=1
...
@@ -144,6 +144,8 @@ NOTIFY_MODE_CERT=1
NOTIFY_MODE_DEFAULT
=
$NOTIFY_MODE_BULK
NOTIFY_MODE_DEFAULT
=
$NOTIFY_MODE_BULK
_BASE64_ENCODED_CFGS
=
"Le_PreHook Le_PostHook Le_RenewHook Le_Preferred_Chain Le_ReloadCmd"
_DEBUG_WIKI
=
"https://github.com/acmesh-official/acme.sh/wiki/How-to-debug-acme.sh"
_DEBUG_WIKI
=
"https://github.com/acmesh-official/acme.sh/wiki/How-to-debug-acme.sh"
_PREPARE_LINK
=
"https://github.com/acmesh-official/acme.sh/wiki/Install-preparations"
_PREPARE_LINK
=
"https://github.com/acmesh-official/acme.sh/wiki/Install-preparations"
...
@@ -6609,6 +6611,7 @@ Commands:
...
@@ -6609,6 +6611,7 @@ Commands:
--revoke Revoke a cert.
--revoke Revoke a cert.
--remove Remove the cert from list of certs known to
$PROJECT_NAME
.
--remove Remove the cert from list of certs known to
$PROJECT_NAME
.
--list List all the certs.
--list List all the certs.
--info Show the
$PROJECT_NAME
configs, or the configs for a domain with [-d domain] parameter.
--to-pkcs12 Export the certificate and key to a pfx file.
--to-pkcs12 Export the certificate and key to a pfx file.
--to-pkcs8 Convert to pkcs8 format.
--to-pkcs8 Convert to pkcs8 format.
--sign-csr Issue a cert from an existing csr.
--sign-csr Issue a cert from an existing csr.
...
@@ -6926,6 +6929,28 @@ setdefaultchain() {
...
@@ -6926,6 +6929,28 @@ setdefaultchain() {
_savecaconf
"DEFAULT_PREFERRED_CHAIN"
"
$_preferred_chain
"
_savecaconf
"DEFAULT_PREFERRED_CHAIN"
"
$_preferred_chain
"
}
}
#domain ecc
info
()
{
_domain
=
"
$1
"
_ecc
=
"
$2
"
_initpath
if
[
-z
"
$_domain
"
]
;
then
_debug
"Show global configs"
echo
"LE_WORKING_DIR=
$LE_WORKING_DIR
"
echo
"LE_CONFIG_HOME=
$LE_CONFIG_HOME
"
cat
"
$ACCOUNT_CONF_PATH
"
else
_debug
"Show domain configs"
(
_initpath
"
$_domain
"
"
$_ecc
"
echo
"DOMAIN_CONF=
$DOMAIN_CONF
"
for
seg
in
$(
cat
$DOMAIN_CONF
|
cut
-d
=
-f
1
)
;
do
echo
"
$seg
=
$(
_readdomainconf
"
$seg
"
)
"
done
)
fi
}
_process
()
{
_process
()
{
_CMD
=
""
_CMD
=
""
_domain
=
""
_domain
=
""
...
@@ -7035,6 +7060,9 @@ _process() {
...
@@ -7035,6 +7060,9 @@ _process() {
--list
)
--list
)
_CMD
=
"list"
_CMD
=
"list"
;;
;;
--info
)
_CMD
=
"info"
;;
--install-cronjob
|
--installcronjob
)
--install-cronjob
|
--installcronjob
)
_CMD
=
"installcronjob"
_CMD
=
"installcronjob"
;;
;;
...
@@ -7586,6 +7614,9 @@ _process() {
...
@@ -7586,6 +7614,9 @@ _process() {
list
)
list
)
list
"
$_listraw
"
"
$_domain
"
list
"
$_listraw
"
"
$_domain
"
;;
;;
info
)
info
"
$_domain
"
"
$_ecc
"
;;
installcronjob
)
installcronjob
"
$_confighome
"
;;
installcronjob
)
installcronjob
"
$_confighome
"
;;
uninstallcronjob
)
uninstallcronjob
;;
uninstallcronjob
)
uninstallcronjob
;;
cron
)
cron
;;
cron
)
cron
;;
...
...
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