Skip to content

Commit

Permalink
upconf cmd: postinit add
Browse files Browse the repository at this point in the history
  • Loading branch information
ak1ra24 committed Dec 25, 2019
1 parent da4e2f5 commit c0e368c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cmd/upconf.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ var upconfCmd = &cobra.Command{
fmt.Println(strings.Join(preExecInitCmds, "\n"))
}
}
if len(tnconfig.PostInit) != 0 {
for _, postInitCmds := range tnconfig.PostInit {
postExecInitCmds := shell.ExecCmd(postInitCmds.Cmds)
fmt.Println(strings.Join(postExecInitCmds, "\n"))
}
}
for _, node := range tnconfig.Nodes {
createNodeCmds := shell.CreateNode(node)
fmt.Println(strings.Join(createNodeCmds, "\n"))
Expand Down Expand Up @@ -72,6 +66,12 @@ var upconfCmd = &cobra.Command{
}
}

if len(tnconfig.PostInit) != 0 {
for _, postInitCmds := range tnconfig.PostInit {
postExecInitCmds := shell.ExecCmd(postInitCmds.Cmds)
fmt.Println(strings.Join(postExecInitCmds, "\n"))
}
}
// conf
nodeinfo := map[string]string{}
for _, node := range tnconfig.Nodes {
Expand Down

0 comments on commit c0e368c

Please sign in to comment.