I just created this script to run the following commands all together at the same time:
#!/bin/bash
cd /home/me/Desktop/folder/app1
sudo service mongod start
grunt dev
cd ../app2
npm start
cd ../app3
npm start
http-server
sudo service nginx restart
but it only runs the first three lines .. help please
grunt
, but I suspect it is not written to daemonize, so you need to background it either with&
or with an application-specific flag. What happens if you executegrunt dev
at the command line? Are you returned a prompt or does the prompt not return until you cause thegrunt
process to exit? – user4556274 Dec 26 '16 at 13:17grunt dev
can be replaced withnpm start
, its perks are that changes that we make are updated instantly, so we use it instead of corruptingnpm start
and rerunning it – h_h10a Dec 26 '16 at 13:24cd
commands I would have the absolute paths. – jtoscarson Dec 26 '16 at 14:11