From 1b5d77e07a248c81bd99d84f26f6769111197643 Mon Sep 17 00:00:00 2001 From: KemoNine Date: Thu, 3 Sep 2020 01:25:42 -0400 Subject: [PATCH] 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 --- cmd/gui/gui.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/gui/gui.go b/cmd/gui/gui.go index faaf25c..0e987ad 100644 --- a/cmd/gui/gui.go +++ b/cmd/gui/gui.go @@ -84,12 +84,12 @@ func main() { return } - pfConfig.Load(configFileProvider, toml.Parser()) + log.Fatalf("Config file changed! Exiting!") }) // Process command line flags 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) {