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
6d7eda3e
Commit
6d7eda3e
authored
Jun 09, 2016
by
neil
Browse files
v2.2.6 Add "--list" command
parent
ee1737a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
acme.sh
View file @
6d7eda3e
#!/usr/bin/env sh
#!/usr/bin/env sh
VER
=
2.2.
5
VER
=
2.2.
6
PROJECT_NAME
=
"acme.sh"
PROJECT_NAME
=
"acme.sh"
...
@@ -1631,6 +1631,23 @@ renewAll() {
...
@@ -1631,6 +1631,23 @@ renewAll() {
}
}
list
()
{
_initpath
printf
"Main_Domain|SAN_Domains|Created|Renew
\n
"
for
d
in
$(
ls
-F
${
CERT_HOME
}
/ |
grep
[
^.].
*
[
.].
*
/
$
)
;
do
d
=
$(
echo
$d
|
cut
-d
'/'
-f
1
)
(
_initpath
$d
if
[
-f
"
$DOMAIN_CONF
"
]
;
then
.
"
$DOMAIN_CONF
"
printf
"
$Le_Domain
|
$Le_Alt
|
$Le_CertCreateTimeStr
|
$Le_NextRenewTimeStr
\n
"
fi
)
done
}
installcert
()
{
installcert
()
{
Le_Domain
=
"
$1
"
Le_Domain
=
"
$1
"
if
[
-z
"
$Le_Domain
"
]
;
then
if
[
-z
"
$Le_Domain
"
]
;
then
...
@@ -2138,6 +2155,7 @@ Commands:
...
@@ -2138,6 +2155,7 @@ Commands:
--renew, -r Renew a cert.
--renew, -r Renew a cert.
--renewAll Renew all the certs
--renewAll Renew all the certs
--revoke Revoke a cert.
--revoke Revoke a cert.
--list List all the certs
--installcronjob Install the cron job to renew certs, you don't need to call this. The 'install' command can automatically install the cron job.
--installcronjob Install the cron job to renew certs, you don't need to call this. The 'install' command can automatically install the cron job.
--uninstallcronjob Uninstall the cron job. The 'uninstall' command can do this automatically.
--uninstallcronjob Uninstall the cron job. The 'uninstall' command can do this automatically.
--cron Run cron job to renew all the certs.
--cron Run cron job to renew all the certs.
...
@@ -2258,6 +2276,9 @@ _process() {
...
@@ -2258,6 +2276,9 @@ _process() {
--revoke
)
--revoke
)
_CMD
=
"revoke"
_CMD
=
"revoke"
;;
;;
--list
)
_CMD
=
"list"
;;
--installcronjob
)
--installcronjob
)
_CMD
=
"installcronjob"
_CMD
=
"installcronjob"
;;
;;
...
@@ -2456,6 +2477,9 @@ _process() {
...
@@ -2456,6 +2477,9 @@ _process() {
revoke
)
revoke
)
revoke
"
$_domain
"
revoke
"
$_domain
"
;;
;;
list
)
list
;;
installcronjob
)
installcronjob
;;
installcronjob
)
installcronjob
;;
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