title: C++ Linux Service - How to use init.d + auto restart?
body: <p>I've created a linux c++ service (It's basically an app, but it handles requests over TCP/IP quite frequently).</p>
  
  <p>I was wondering if there is any easy way to have it "auto restart" if something goes wrong (like it crashes) or if the server restarts?</p>
  
  <p>I wasn't sure how or even if I should set it up as a service or set up an rc.d script, I'm not 100% familiar w/how to do this on linux (my server is running ubuntu if it matters).</p>
  
  <p>Any advice would be greatly appreciated!</p>
  
  <p>~ Josh</p>