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
cdb3216c
Commit
cdb3216c
authored
Jan 21, 2017
by
neil
Committed by
GitHub
Jan 21, 2017
Browse files
Merge pull request #554 from Neilpang/dev
add --remove
parents
2cd47b02
78f0201d
Changes
1
Hide whitespace changes
Inline
Side-by-side
acme.sh
View file @
cdb3216c
...
...
@@ -3431,7 +3431,7 @@ uninstallcronjob() {
revoke
()
{
Le_Domain
=
"
$1
"
if
[
-z
"
$Le_Domain
"
]
;
then
_usage
"Usage:
$PROJECT_ENTRY
--revoke -d domain.com"
_usage
"Usage:
$PROJECT_ENTRY
--revoke -d domain.com
[--ecc]
"
return
1
fi
...
...
@@ -3489,6 +3489,37 @@ revoke() {
return
1
}
#domain ecc
remove
()
{
Le_Domain
=
"
$1
"
if
[
-z
"
$Le_Domain
"
]
;
then
_usage
"Usage:
$PROJECT_ENTRY
--remove -d domain.com [--ecc]"
return
1
fi
_isEcc
=
"
$2
"
_initpath
"
$Le_Domain
"
"
$_isEcc
"
_removed_conf
=
"
$DOMAIN_CONF
.removed"
if
[
!
-f
"
$DOMAIN_CONF
"
]
;
then
if
[
-f
"
$_removed_conf
"
]
;
then
_err
"
$Le_Domain
is already removed, You can remove the folder by yourself:
$DOMAIN_PATH
"
else
_err
"
$Le_Domain
is not a issued domain, skip."
fi
return
1
fi
if
mv
"
$DOMAIN_CONF
"
"
$_removed_conf
"
;
then
_info
"
$Le_Domain
is removed, the key and cert files are in
$(
__green
$DOMAIN_PATH
)
"
_info
"You can remove them by yourself."
return
0
else
_err
"Remove
$Le_Domain
failed."
return
1
fi
}
#domain vtype
_deactivate
()
{
_d_domain
=
"
$1
"
...
...
@@ -3944,6 +3975,7 @@ Commands:
--renew, -r Renew a cert.
--renew-all Renew all the certs.
--revoke Revoke a cert.
--remove Remove the cert from
$PROJECT
--list List all the certs.
--showcsr Show the content of a csr.
--install-cronjob Install the cron job to renew certs, you don't need to call this. The 'install' command can automatically install the cron job.
...
...
@@ -4176,6 +4208,9 @@ _process() {
--revoke
)
_CMD
=
"revoke"
;;
--remove
)
_CMD
=
"remove"
;;
--list
)
_CMD
=
"list"
;;
...
...
@@ -4535,6 +4570,9 @@ _process() {
revoke
)
revoke
"
$_domain
"
"
$_ecc
"
;;
remove
)
remove
"
$_domain
"
"
$_ecc
"
;;
deactivate
)
deactivate
"
$_domain
,
$_altdomains
"
;;
...
...
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