diff --git a/send.go b/send.go index 7a1decc..b2c7c98 100644 --- a/send.go +++ b/send.go @@ -70,6 +70,10 @@ func sendMachine(s string) error { shell.RunRealtime([]string{"apt", "install", "zood"}) shell.RunRealtime([]string{"rm", "-f", "/usr/bin/zood.last"}) os.Exit(0) + } else if strings.HasPrefix(line, "apt install") { + log.Info("machine install", line) + shell.RunRealtime([]string{"apt", "update"}) + shell.RunRealtime(strings.Split(line, " ")) } else { log.Info(me.urlbase, "is maybe not working GOT:", line) log.Info(me.urlbase, "fail count", me.failcount, "from hostname", me.machine.Hostname)