title: How to run a shell script at startup
body: <p>On an <a href="https://en.wikipedia.org/wiki/Amazon_S3" rel="noreferrer">Amazon S3</a> Linux instance, I have two scripts called <code>start_my_app</code> and <code>stop_my_app</code> which start and stop <em><a href="https://www.npmjs.com/package/forever" rel="noreferrer">forever</a></em> (which in turn runs my Node.js application). I use these scripts to manually start and stop my Node.js application. So far so good.</p>
  
  <p>My problem: I also want to set it up such that <code>start_my_app</code> is run whenever the system boots up. I know that I need to add a file inside <code>init.d</code> and I know how to symlink it to the proper directory within <code>rc.d</code>, but I can't figure out what actually needs to go inside the file that I place in <code>init.d</code>. I'm thinking it should be just one line, like, <code>start_my_app</code>, but that hasn't been working for me.</p>