mirror of
https://github.com/mjl-/mox.git
synced 2024-12-26 16:33:47 +03:00
at startup, print absolute path to config files that we read
after a post on HN about how that's useful for services you haven't had to do anything with for a while. will help with debugging in that case.
This commit is contained in:
parent
d854bc116f
commit
96326846cd
1 changed files with 6 additions and 1 deletions
7
serve.go
7
serve.go
|
@ -157,7 +157,12 @@ requested, other TLS certificates are requested on demand.
|
|||
// to start the child process.
|
||||
runtime.GOMAXPROCS(1)
|
||||
|
||||
log.Print("starting as root, initializing network listeners", mlog.Field("version", moxvar.Version), mlog.Field("pid", os.Getpid()))
|
||||
moxconf, err := filepath.Abs(mox.ConfigStaticPath)
|
||||
log.Check(err, "finding absolute mox.conf path")
|
||||
domainsconf, err := filepath.Abs(mox.ConfigDynamicPath)
|
||||
log.Check(err, "finding absolute domains.conf path")
|
||||
|
||||
log.Print("starting as root, initializing network listeners", mlog.Field("version", moxvar.Version), mlog.Field("pid", os.Getpid()), mlog.Field("moxconf", moxconf), mlog.Field("domainsconf", domainsconf))
|
||||
if os.Getenv("MOX_SOCKETS") != "" {
|
||||
log.Fatal("refusing to start as root with $MOX_SOCKETS set")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue