attempt to send start output back
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
86df520638
commit
84390c4ebc
17
http.go
17
http.go
|
@ -55,11 +55,22 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
|
|||
start := r.URL.Query().Get("start")
|
||||
xml := "/root/jcarr/machines/autostart/" + start + ".xml"
|
||||
cmd := []string{"virsh", "create", xml}
|
||||
fmt.Fprintln(w, "Handling URL:", tmp, "should start here: droplet")
|
||||
fmt.Fprintln(w, "start returned: ", start)
|
||||
log.Warn("should start droplet", start, "here")
|
||||
|
||||
fmt.Fprintln(w, "Handling URL:", tmp, "start droplet")
|
||||
log.Warn("cmd :", cmd)
|
||||
|
||||
fmt.Fprintln(w, "Handling URL:", tmp, "start droplet")
|
||||
fmt.Fprintln(w, "cmd: ", cmd)
|
||||
err, ok, output := shell.RunCmd("/home/", cmd)
|
||||
shell.Run(cmd)
|
||||
if ok {
|
||||
fmt.Fprintln(w, "START OK")
|
||||
fmt.Fprintln(w, output)
|
||||
} else {
|
||||
fmt.Fprintln(w, "START FAILED")
|
||||
fmt.Fprintln(w, "error =", err)
|
||||
fmt.Fprintln(w, "output =", output)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue