attempt to send the right command to zood

This commit is contained in:
Jeff Carr 2025-03-23 18:19:53 -05:00
parent 0a70f3bdde
commit 64d44e2272
1 changed files with 5 additions and 1 deletions

View File

@ -55,7 +55,11 @@ func handleMachine(r *http.Request, w http.ResponseWriter, hostname string, data
}
if m.Upgrade {
log.Info(m.Hostname, "was told to upgrade zood")
fmt.Fprintln(w, "apt update")
if m.UpgradeCmd == "" {
fmt.Fprintln(w, "apt update")
} else {
fmt.Fprintln(w, m.UpgradeCmd)
}
m.Upgrade = false
} else {
fmt.Fprintln(w, "good")