summaryrefslogtreecommitdiff
path: root/machine.go
diff options
context:
space:
mode:
Diffstat (limited to 'machine.go')
-rw-r--r--machine.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/machine.go b/machine.go
index 8ddf63f..d6becc1 100644
--- a/machine.go
+++ b/machine.go
@@ -54,7 +54,12 @@ func handleMachine(r *http.Request, w http.ResponseWriter, hostname string, data
log.Info("hostname ua changed len =", len(data), ra, hostname, ua)
m.UserAgent = ua
}
- fmt.Fprintln(w, "upgrade")
+ if m.Upgrade {
+ fmt.Fprintln(w, "apt update")
+ m.Upgrade = false
+ } else {
+ fmt.Fprintln(w, "upgrade")
+ }
// log.Info("update machine protobuf", hostname)
updateMachine(newm)
}