summaryrefslogtreecommitdiff
path: root/daemon.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-07 10:13:49 -0500
committerJeff Carr <[email protected]>2025-10-07 10:13:49 -0500
commit79addd26bb68bc8ebb3c56e68b5c1dc636a1db62 (patch)
tree1a064d1192d15347d21cb2349502a8bffaeae07e /daemon.go
parent8c3e803f27d5af38630da914152858789dbff615 (diff)
Diffstat (limited to 'daemon.go')
-rw-r--r--daemon.go14
1 files changed, 11 insertions, 3 deletions
diff --git a/daemon.go b/daemon.go
index 17c486e..beb1e30 100644
--- a/daemon.go
+++ b/daemon.go
@@ -9,6 +9,7 @@ import (
"time"
"go.wit.com/lib/debian"
+ "go.wit.com/log"
)
// timeFunction takes a function as an argument and returns the execution time.
@@ -29,9 +30,16 @@ func zood() {
fmt.Println("Done!")
return
case _ = <-me.dog.C:
- s := debian.UpdatePackages(me.machine)
- me.failcount += 1
- sendMachine(s)
+ err := debian.UpdatePackages(me.machine)
+ if err != nil {
+ log.Info("UpdatePackages err", err)
+ me.failcount += 1
+ }
+ err = sendMachine(me.machine)
+ if err != nil {
+ log.Info("sendMachine err", err)
+ me.failcount += 1
+ }
if me.failcount > 20 {
os.Exit(0)