trigger apt upgrade

This commit is contained in:
Jeff Carr 2025-03-06 05:31:31 -06:00
parent e85a8ae69f
commit 76c5626d0a
1 changed files with 6 additions and 1 deletions

View File

@ -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)
}