This commit is contained in:
zhoujunhao 2018-08-27 12:48:14 +08:00
parent 615f7bfac4
commit f2fe0c71c1

View File

@ -466,12 +466,8 @@ func NewCmdNode() cli.Command {
line := fmt.Sprintf("cd /opt/rainbond/install/scripts; ./%s.sh %s %s %s %s %s", c.String("role"), c.String("hostname"),
c.String("internal-ip"), model, c.String("root-pass"), c.String("private-key"))
cmd := exec.Command("bash", "-c", line)
//cmd.Stdout = os.Stdout
//cmd.Stderr = os.Stderr
fileName := c.String("hostname") + ".log"
f, _ := os.OpenFile("/grdata/downloads/log/"+fileName, os.O_WRONLY|os.O_CREATE|os.O_SYNC, 0755)
cmd.Stdout = f
cmd.Stderr = f
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
err := cmd.Run()
if err != nil {