mirror of
https://github.com/caddyserver/caddy.git
synced 2026-06-30 05:42:50 +00:00
Don't prompt for email when user is not there to provide one
Also don't bother showing stdout output in same situation
This commit is contained in:
parent
46bc0d5c4e
commit
68be4a9161
2 changed files with 29 additions and 3 deletions
|
|
@ -10,7 +10,9 @@ import (
|
|||
)
|
||||
|
||||
func activateHTTPS(cctx caddy.Context) error {
|
||||
if !caddy.Quiet {
|
||||
operatorPresent := !caddy.Started()
|
||||
|
||||
if !caddy.Quiet && operatorPresent {
|
||||
fmt.Print("Activating privacy features...")
|
||||
}
|
||||
|
||||
|
|
@ -21,7 +23,7 @@ func activateHTTPS(cctx caddy.Context) error {
|
|||
|
||||
// place certificates and keys on disk
|
||||
for _, c := range ctx.siteConfigs {
|
||||
err := c.TLS.ObtainCert(true)
|
||||
err := c.TLS.ObtainCert(operatorPresent)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -44,9 +46,10 @@ func activateHTTPS(cctx caddy.Context) error {
|
|||
return err
|
||||
}
|
||||
|
||||
if !caddy.Quiet {
|
||||
if !caddy.Quiet && operatorPresent {
|
||||
fmt.Println(" done.")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue