Tweak string format, exit if config changes -- let monit and / or systemd restart if the config changes on disk out from under the running app ; will add save/exit button later to ensure that making changes via the config ui doesn't cause the app to restart after every change

This commit is contained in:
KemoNine 2020-09-03 01:25:42 -04:00
parent a1c2415536
commit 1b5d77e07a

View file

@ -84,12 +84,12 @@ func main() {
return return
} }
pfConfig.Load(configFileProvider, toml.Parser()) log.Fatalf("Config file changed! Exiting!")
}) })
// Process command line flags // Process command line flags
if err := pfConfig.Load(posflag.Provider(f, ".", pfConfig), nil); err != nil { if err := pfConfig.Load(posflag.Provider(f, ".", pfConfig), nil); err != nil {
log.Fatalf("Error loading command line flags : %v", err) log.Fatalf("Error loading command line flags : %s", err)
} }
if !pfConfig.Bool(CLI_FLAG_CONFIG_ONLY) { if !pfConfig.Bool(CLI_FLAG_CONFIG_ONLY) {