From 23b530ae36b2b5dc42820ff01a4a1c9bd6a4d2b4 Mon Sep 17 00:00:00 2001 From: Mechiel Lukkien Date: Mon, 13 Feb 2023 22:40:45 +0100 Subject: [PATCH] use config/mox.conf as default path for the config file this matches how the quickstart recommends setting up mox. i've been running "./mox -config/mox.conf" from there for admin commands, but "mox" is enough now. --- doc.go | 2 +- main.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc.go b/doc.go index 0ee0b90..d7f9a2d 100644 --- a/doc.go +++ b/doc.go @@ -12,7 +12,7 @@ low-maintenance self-hosted email. # Commands - mox [-config mox.conf] ... + mox [-config config/mox.conf] ... mox serve mox quickstart user@domain mox restart diff --git a/main.go b/main.go index d913ffb..8b269d8 100644 --- a/main.go +++ b/main.go @@ -322,7 +322,7 @@ Used to generate documentation. func usage(l []cmd, unlisted bool) { var lines []string if !unlisted { - lines = append(lines, "mox [-config mox.conf] ...") + lines = append(lines, "mox [-config config/mox.conf] ...") } for _, c := range l { c.gather() @@ -374,7 +374,7 @@ func main() { return } - flag.StringVar(&mox.ConfigStaticPath, "config", envString("MOXCONF", "mox.conf"), "configuration file, other config files are looked up in the same directory, defaults to $MOXCONF with a fallback to mox.conf") + flag.StringVar(&mox.ConfigStaticPath, "config", envString("MOXCONF", "config/mox.conf"), "configuration file, other config files are looked up in the same directory, defaults to $MOXCONF with a fallback to mox.conf") flag.StringVar(&loglevel, "loglevel", "", "if non-empty, this log level is set early in startup") flag.Usage = func() { usage(cmds, false) }