1
0
mirror of https://github.com/go-acme/lego.git synced 2024-12-26 03:09:37 +02:00

Fix account storage location warning message (#1127)

This commit is contained in:
Dominik Menke 2020-04-27 19:23:17 +02:00
parent cb5d3a8fdb
commit 4fe3bcfc6f

View File

@ -43,6 +43,17 @@ func createRun() cli.Command {
}
}
const rootPathWarningMessage = `!!!! HEADS UP !!!!
Your account credentials have been saved in your Let's Encrypt
configuration directory at "%s".
You should make a secure backup of this folder now. This
configuration directory will also contain certificates and
private keys obtained from Let's Encrypt so making regular
backups of this folder is ideal.
`
func run(ctx *cli.Context) error {
accountsStorage := NewAccountsStorage(ctx)
@ -56,19 +67,11 @@ func run(ctx *cli.Context) error {
}
account.Registration = reg
if err = accountsStorage.Save(account); err != nil {
log.Fatal(err)
}
fmt.Println("!!!! HEADS UP !!!!")
fmt.Printf(`
Your account credentials have been saved in your Let's Encrypt
configuration directory at "%s".
You should make a secure backup of this folder now. This
configuration directory will also contain certificates and
private keys obtained from Let's Encrypt so making regular
backups of this folder is ideal.`, accountsStorage.GetRootPath())
fmt.Printf(rootPathWarningMessage, accountsStorage.GetRootPath())
}
certsStorage := NewCertificatesStorage(ctx)