diff options
| -rw-r--r-- | daemon.go | 4 | ||||
| -rw-r--r-- | main.go | 7 |
2 files changed, 7 insertions, 4 deletions
@@ -7,6 +7,8 @@ import ( "fmt" "os" "time" + + "go.wit.com/lib/debian" ) // timeFunction takes a function as an argument and returns the execution time. @@ -27,7 +29,7 @@ func zood() { fmt.Println("Done!") return case _ = <-me.dog.C: - s := me.machine.UpdatePackages() + s := debian.UpdatePackages(me.machine) me.failcount += 1 sendMachine(s) @@ -9,6 +9,7 @@ import ( "os" "time" + "go.wit.com/lib/debian" "go.wit.com/lib/gui/prep" "go.wit.com/lib/hostname" "go.wit.com/lib/protobuf/zoopb" @@ -32,9 +33,9 @@ func main() { if argv.Daemon { // turn off timestamps for STDOUT (systemd adds them) log.DaemonMode(true) - me.machine, me.fullpath = zoopb.InitDaemon() + me.machine = debian.InitDaemon() } else { - me.machine, me.fullpath = zoopb.InitMachine() + me.machine = debian.InitMachine() } if argv.Status != nil { @@ -111,7 +112,7 @@ func testURL(urlbase string, pb *zoopb.Machine) error { return err } wsPB.DumpClient() - newpb.Dump() + log.Infof("mem=%d cpus=%d\n", newpb.Memory, newpb.Cpus) log.Info("got error:", err) return err } |
