diff options
| author | Jeff Carr <[email protected]> | 2025-03-06 07:50:10 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-03-06 07:54:56 -0600 |
| commit | 14ee66fe6ac3fc995ee04b4628d2a1bf874d73e1 (patch) | |
| tree | f91ccf5b0aebcf7ea17eefb92275b1ee97cfb9c6 /send.go | |
| parent | 560162d2b2f97b8c653b62fc2e03d5c838514284 (diff) | |
rm some output
Diffstat (limited to 'send.go')
| -rw-r--r-- | send.go | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -53,21 +53,22 @@ func sendMachine(s string) error { return err } out := strings.TrimSpace(string(body)) - log.Info("httpPost() data:", out, len(body)) + // log.Info("httpPost() data:", out, len(body)) test := strings.TrimSpace(string(body)) // log.Info("virtigo returned body:", test) for _, line := range strings.Split(test, "\n") { - if line == "upgrade" { + if line == "good" { log.Info(s, "zookeeper is healthy") me.failcount = 0 } else if line == "kill" { os.Exit(0) } else if strings.HasPrefix(line, "apt update") { log.Info("machine upgrade now", line) - shell.Run([]string{"apt", "update"}) - shell.Run([]string{"apt", "install", "zood"}) - log.Sleep(1) + shell.RunRealtime([]string{"mv", "-f", "/usr/bin/zood", "/usr/bin/zood.last"}) + shell.RunRealtime([]string{"apt", "update"}) + shell.RunRealtime([]string{"apt", "install", "zood"}) + shell.RunRealtime([]string{"rm", "-f", "/usr/bin/zood.last"}) os.Exit(0) } else { log.Info(me.urlbase, "is maybe not working GOT:", line) |
