summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-11-15 09:12:08 -0600
committerJeff Carr <[email protected]>2024-11-15 09:12:08 -0600
commit7b069233955c6f35270f0cb2cb49bf6038c11020 (patch)
tree15515a666395193f7f0aebccdc6cc68573267d3a /main.go
parent6c920e0925c5b9db4354c31a693140adf024d88b (diff)
add watchdog
Diffstat (limited to 'main.go')
-rw-r--r--main.go17
1 files changed, 9 insertions, 8 deletions
diff --git a/main.go b/main.go
index 7c17d5e..ab7717c 100644
--- a/main.go
+++ b/main.go
@@ -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()
}