add config file checking.

This commit is contained in:
Miroslav Šedivý 2021-03-18 19:47:28 +01:00
parent 916222b6df
commit 27b1ca54c0

View File

@ -122,9 +122,13 @@ func init() {
if file == "" { if file == "" {
logger.Warn().Msg("preflight complete without config file") logger.Warn().Msg("preflight complete without config file")
} else {
if _, err := os.Stat(config); os.IsNotExist(err) {
logger.Error().Msg("preflight complete with nonexistent config file")
} else { } else {
logger.Info().Msg("preflight complete") logger.Info().Msg("preflight complete")
} }
}
neko.Service.Configs.Root.Set() neko.Service.Configs.Root.Set()
}) })