mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-12-04 04:38:04 +08:00
[FMT]
This commit is contained in:
parent
615f7bfac4
commit
f2fe0c71c1
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user