title: Forever.js starting and restarting multiple scripts
body: <p>My web app has 3 main node.js components: website, feeds and jobs.</p>
  
  <p>To start these I am using forever:</p>
  
  <pre><code>//forever.js
  
  var forever = require('forever');
  
  function start(name){
  
    forever.start( ['coffee', name + '.coffee'], { /* log options */ } )
  
  };
  
  start('website');
  start('feeds');
  start('jobs');
  </code></pre>
  
  <p>What I first noticed is that if I run script it wont run it as a daemon. ( Which is most likely normal )</p>
  
  <pre><code>node forever.js
  </code></pre>
  
  <p>So what I did next was run the forever.js script with forever. I am not sure if this is correct, there is also a forever.startDaemon so not sure which one I should use.</p>
  
  <pre><code>forever start forever.js
  </code></pre>
  
  <p>This works but the problem is that I would like to restart all the processes when a new version of my app is published. I am using git's post-receive hook to run the forever.js the first time but if I do this on each post-recieve it will just spawn 3 processes each time.</p>
  
  <p>So I guess I need a way to restart 3 processes if they are already running. I thought to do this with forever.list but the documentation only say: </p>
  
  <pre><code>forever.list (format, callback)
  
  Returns a list of metadata objects about each process that is being run using 
  forever. This method is synchronous and will return the list of metadata as such.
  Only processes which have invoked forever.startServer() will be available from
  forever.list()
  </code></pre>
  
  <p>First of all I am not sure what format means and second it expects a callback but then it says its synchronous. Which is a little confusing and I am not sure how to use list.</p>
  
  <p>In the end all I want to do is start/restart 3 node.js processes on git's post-receive hook.</p>