diff options
| author | Jeff Carr <[email protected]> | 2024-11-15 09:12:08 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-11-15 09:12:08 -0600 |
| commit | 7b069233955c6f35270f0cb2cb49bf6038c11020 (patch) | |
| tree | 15515a666395193f7f0aebccdc6cc68573267d3a /main.go | |
| parent | 6c920e0925c5b9db4354c31a693140adf024d88b (diff) | |
add watchdog
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -18,6 +18,7 @@ import ( "embed" "fmt" "os" + "time" "go.wit.com/dev/alexflint/arg" "go.wit.com/log" @@ -37,6 +38,13 @@ func main() { os.Exit(0) } + me = new(stuff) + me.Zookeeper = "zookeeper.wit.com" + me.Hostname, _ = os.Hostname() + me.pollDelay = 3 * time.Second + + log.DaemonMode(true) + installedPackages, err := getInstalledPackages() if err != nil { fmt.Println("Error:", err) @@ -47,14 +55,7 @@ func main() { for pkg, version := range installedPackages { fmt.Printf("%s: %s\n", pkg, version) } - os.Exit(0) - - me = new(stuff) - me.Hostname, _ = os.Hostname() - - log.DaemonMode(true) - - // reportOS() + go NewWatchdog() startHTTP() } |
