I want to write a grunt task to start the process mongod if the server is not already running. I need a mongod process running, but also need grunt-watch to work later in the task flow.
This question explains how to start mongod using grunt-shell ... the accepted answer is blocking, and the async version will spawn a new server even if one exists.
Is there a way (e.g. shell script) to start mongod only if it is not running, without blocking the rest of the grunt task flow?
Thanks