mirror of
https://github.com/mjl-/mox.git
synced 2025-06-28 08:58:16 +03:00
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.
This commit is contained in:
parent
4a58b8f434
commit
23b530ae36
2
doc.go
2
doc.go
@ -12,7 +12,7 @@ low-maintenance self-hosted email.
|
|||||||
|
|
||||||
# Commands
|
# Commands
|
||||||
|
|
||||||
mox [-config mox.conf] ...
|
mox [-config config/mox.conf] ...
|
||||||
mox serve
|
mox serve
|
||||||
mox quickstart user@domain
|
mox quickstart user@domain
|
||||||
mox restart
|
mox restart
|
||||||
|
4
main.go
4
main.go
@ -322,7 +322,7 @@ Used to generate documentation.
|
|||||||
func usage(l []cmd, unlisted bool) {
|
func usage(l []cmd, unlisted bool) {
|
||||||
var lines []string
|
var lines []string
|
||||||
if !unlisted {
|
if !unlisted {
|
||||||
lines = append(lines, "mox [-config mox.conf] ...")
|
lines = append(lines, "mox [-config config/mox.conf] ...")
|
||||||
}
|
}
|
||||||
for _, c := range l {
|
for _, c := range l {
|
||||||
c.gather()
|
c.gather()
|
||||||
@ -374,7 +374,7 @@ func main() {
|
|||||||
return
|
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.StringVar(&loglevel, "loglevel", "", "if non-empty, this log level is set early in startup")
|
||||||
|
|
||||||
flag.Usage = func() { usage(cmds, false) }
|
flag.Usage = func() { usage(cmds, false) }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user