mirror of
https://github.com/mjl-/mox.git
synced 2024-12-27 08:53:48 +03:00
quickstart: don't print logging line about new password
This commit is contained in:
parent
ee1094e1cb
commit
dbd6773f6b
1 changed files with 9 additions and 0 deletions
|
@ -31,6 +31,7 @@ import (
|
||||||
"github.com/mjl-/mox/config"
|
"github.com/mjl-/mox/config"
|
||||||
"github.com/mjl-/mox/dns"
|
"github.com/mjl-/mox/dns"
|
||||||
"github.com/mjl-/mox/dnsbl"
|
"github.com/mjl-/mox/dnsbl"
|
||||||
|
"github.com/mjl-/mox/mlog"
|
||||||
"github.com/mjl-/mox/mox-"
|
"github.com/mjl-/mox/mox-"
|
||||||
"github.com/mjl-/mox/smtp"
|
"github.com/mjl-/mox/smtp"
|
||||||
"github.com/mjl-/mox/store"
|
"github.com/mjl-/mox/store"
|
||||||
|
@ -842,9 +843,17 @@ and check the admin page for the needed DNS records.`)
|
||||||
cleanupPaths = append(cleanupPaths, dataDir, filepath.Join(dataDir, "accounts"), filepath.Join(dataDir, "accounts", accountName), filepath.Join(dataDir, "accounts", accountName, "index.db"))
|
cleanupPaths = append(cleanupPaths, dataDir, filepath.Join(dataDir, "accounts"), filepath.Join(dataDir, "accounts", accountName), filepath.Join(dataDir, "accounts", accountName, "index.db"))
|
||||||
|
|
||||||
password := pwgen()
|
password := pwgen()
|
||||||
|
|
||||||
|
// Kludge to cause no logging to be printed about setting a new password.
|
||||||
|
loglevel := mox.Conf.Log[""]
|
||||||
|
mox.Conf.Log[""] = mlog.LevelWarn
|
||||||
|
mlog.SetConfig(mox.Conf.Log)
|
||||||
if err := acc.SetPassword(c.log, password); err != nil {
|
if err := acc.SetPassword(c.log, password); err != nil {
|
||||||
fatalf("setting password: %s", err)
|
fatalf("setting password: %s", err)
|
||||||
}
|
}
|
||||||
|
mox.Conf.Log[""] = loglevel
|
||||||
|
mlog.SetConfig(mox.Conf.Log)
|
||||||
|
|
||||||
if err := acc.Close(); err != nil {
|
if err := acc.Close(); err != nil {
|
||||||
fatalf("closing account: %s", err)
|
fatalf("closing account: %s", err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue