diff options
| author | Jeff Carr <[email protected]> | 2025-09-08 20:41:51 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-09-08 23:14:04 -0500 |
| commit | d00e96e35405f168791c4b19f0271a0db5b2b0d2 (patch) | |
| tree | 240441ca9d3159359412cab357e0249929f9a568 /main.go | |
| parent | 0c4a91054f49dd1ff89fd74c7972c8282f18c70f (diff) | |
cleanupsv0.0.67
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 28 |
1 files changed, 15 insertions, 13 deletions
@@ -4,12 +4,12 @@ package main import ( - "embed" "os" "time" "go.wit.com/dev/alexflint/arg" "go.wit.com/gui" + "go.wit.com/lib/fhelp" "go.wit.com/lib/protobuf/zoopb" "go.wit.com/log" ) @@ -17,17 +17,19 @@ import ( var VERSION string var BUILDTIME string -//go:embed resources/* -var resources embed.FS +var ARGNAME string = "zookeeper" func main() { - log.Warn("zookeeper PID:", os.Getpid(), os.Args) - var pp *arg.Parser - gui.InitArg() // include the 'gui' package command line arguements - pp = arg.MustParse(&argv) // parse the command line + me = new(mainType) + gui.InitArg() + me.pp = arg.MustParse(&argv) - if pp == nil { - pp.WriteHelp(os.Stdout) + if argv.Bash { + fhelp.DoBash(ARGNAME) + os.Exit(0) + } + if len(argv.BashAuto) != 0 { + argv.doBashAuto() os.Exit(0) } @@ -47,7 +49,6 @@ func main() { log.DaemonMode(true) } - me = new(zookeep) me.hostname, _ = os.Hostname() me.pollDelay = time.Hour me.machines = zoopb.NewMachines() @@ -55,9 +56,10 @@ func main() { log.Warn("load config failed", err) os.Exit(-1) } - // me.upgrade = make(map[string]bool) // used to trigger upgrade attempts - - // log.Sleep(3) + if argv.List != nil { + log.Info("do list here") + okExit("") + } go NewWatchdog() if !argv.NoPort { |
