Skip to content

Commit

Permalink
Fix account storage location warning message (go-acme#1127)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmke committed Apr 27, 2020
1 parent cb5d3a8 commit 4fe3bcf
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions cmd/cmd_run.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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)
Expand Down

0 comments on commit 4fe3bcf

Please sign in to comment.