attempt to apt upgrade things
This commit is contained in:
parent
812c10091e
commit
9b4bbeea80
10
send.go
10
send.go
|
@ -72,8 +72,14 @@ func sendMachine(s string) error {
|
|||
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, " "))
|
||||
parts := strings.Fields(line)
|
||||
if len(parts) > 1 {
|
||||
cmd := []string{"apt", "update"}
|
||||
cmd = append(cmd, parts[1:]...)
|
||||
shell.RunRealtime(cmd)
|
||||
} else {
|
||||
log.Info("nothing to install for line:", 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)
|
||||
|
|
Loading…
Reference in New Issue