I am currently developing a program where you can create virtual machines in VirtualBox as a project. To do this I need to run 2 commands synchronously as one creates a VM and the other modifies that VM. Here is the code.
nodecmd.run(cmd);
var cmd1 = createCmd1.concat(createServ);
console.log(cmd1);
var cmd2 = cmd1.concat(' --natpf1 "ssh,tcp,,302');
console.log(cmd2);
var cmd3 = cmd2.concat(createServ);
console.log(cmd3);
var cmd4 = cmd3.concat(',,22"');
console.log(cmd4);
nodecmd.run(cmd4);
Thanks!
nodecmdis and how it would return child processes.