diff options
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 24 |
1 files changed, 19 insertions, 5 deletions
@@ -21,15 +21,27 @@ var BUILDTIME string var resources embed.FS func main() { + log.Warn("zookeeper PID:", os.Getpid(), os.Args) var pp *arg.Parser - gui.InitArg() - pp = arg.MustParse(&argv) + gui.InitArg() // include the 'gui' package command line arguements + pp = arg.MustParse(&argv) // parse the command line if pp == nil { pp.WriteHelp(os.Stdout) os.Exit(0) } + // check if the binary is being called to test + // if the plugin can actually loaded. This is a hack + // around needing a Test() plugin load function in GO + if gui.IsGoPluginTestHack() { + argv.NoPort = true + gui.CheckPlugin() + os.Exit(0) + // if argv.GuiCheck != "" { + // } + } + if argv.Daemon { // turn off timestamps for STDOUT (systemd adds them) log.DaemonMode(true) @@ -45,9 +57,11 @@ func main() { } // me.upgrade = make(map[string]bool) // used to trigger upgrade attempts - go NewWatchdog() - - go startHTTP() + // log.Sleep(3) + go NewWatchdog() + if !argv.NoPort { + go startHTTP() + } doGui() } |
