forked from TrueCloudLab/lego
renew/revoke - don't panic on wrong account (#446)
This commit is contained in:
parent
5a2fd5039f
commit
b63985c974
1 changed files with 8 additions and 3 deletions
|
@ -329,8 +329,10 @@ func run(c *cli.Context) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func revoke(c *cli.Context) error {
|
func revoke(c *cli.Context) error {
|
||||||
|
conf, acc, client := setup(c)
|
||||||
conf, _, client := setup(c)
|
if acc.Registration == nil {
|
||||||
|
logger().Fatalf("Account %s is not registered. Use 'run' to register a new account.\n", acc.Email)
|
||||||
|
}
|
||||||
|
|
||||||
err := checkFolder(conf.CertPath())
|
err := checkFolder(conf.CertPath())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -355,7 +357,10 @@ func revoke(c *cli.Context) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func renew(c *cli.Context) error {
|
func renew(c *cli.Context) error {
|
||||||
conf, _, client := setup(c)
|
conf, acc, client := setup(c)
|
||||||
|
if acc.Registration == nil {
|
||||||
|
logger().Fatalf("Account %s is not registered. Use 'run' to register a new account.\n", acc.Email)
|
||||||
|
}
|
||||||
|
|
||||||
if len(c.GlobalStringSlice("domains")) <= 0 {
|
if len(c.GlobalStringSlice("domains")) <= 0 {
|
||||||
logger().Fatal("Please specify at least one domain.")
|
logger().Fatal("Please specify at least one domain.")
|
||||||
|
|
Loading…
Reference in a new issue