mirror of
https://github.com/mjl-/mox.git
synced 2024-12-26 16:33:47 +03:00
fix checking for tls certificates, and the quickstart with the -existing-webserver flag
some time ago, the flag to ParseConfig() to do or skip checking the tls keys/certs was inverted, but it looks like i didn't change the call sites... so during "mox config test", and after a regular "mox quickstart" there was no check for the tls keys/certs, and during "mox quickstart -existing-webserver" there was a check where there shouldn't be. this made using -existing-webserver impossible. this became clear with the question by morki in issue #5.
This commit is contained in:
parent
48eb530b1f
commit
f96310fdd5
2 changed files with 5 additions and 3 deletions
4
main.go
4
main.go
|
@ -512,7 +512,9 @@ are printed.
|
|||
c.Usage()
|
||||
}
|
||||
|
||||
_, errs := mox.ParseConfig(context.Background(), mox.ConfigStaticPath, true, false, false)
|
||||
mox.FilesImmediate = true
|
||||
|
||||
_, errs := mox.ParseConfig(context.Background(), mox.ConfigStaticPath, true, true, false)
|
||||
if len(errs) > 1 {
|
||||
log.Printf("multiple errors:")
|
||||
for _, err := range errs {
|
||||
|
|
|
@ -645,8 +645,8 @@ too many authentication failures).
|
|||
xwritefile("config/domains.conf", []byte(dconfstr), 0660)
|
||||
|
||||
// Verify config.
|
||||
skipCheckTLSKeyCerts := existingWebserver
|
||||
mc, errs := mox.ParseConfig(context.Background(), "config/mox.conf", true, skipCheckTLSKeyCerts, false)
|
||||
loadTLSKeyCerts := !existingWebserver
|
||||
mc, errs := mox.ParseConfig(context.Background(), "config/mox.conf", true, loadTLSKeyCerts, false)
|
||||
if len(errs) > 0 {
|
||||
if len(errs) > 1 {
|
||||
log.Printf("checking generated config, multiple errors:")
|
||||
|
|
Loading…
Reference in a new issue