title: How to start mongod from boot script without running as root?
body: <p>mongod runs fine as my own system user, but when I attempt to start it from a boot script using sudo, it fails.</p>
  
  <p>I'm not running it as root, i'm doing:</p>
  
  <pre><code>sudo -u normaluser /user/local/bin/mongod --fork --logpath=/var/log/mongodb.log --logappend &gt;/dev/null 2&gt;&amp;1 &amp;
  </code></pre>
  
  <p>The log file is writeable by normaluser and I have no problem running it as normaluser directly.</p>
  
  <p>How can I start this on boot?</p>