Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>For one thing, you are passing an $ARGS variable that is never actually defined. You will probably want to either pass some <a href="http://www.mongodb.org/display/DOCS/Command+Line+Parameters" rel="nofollow">configuration options</a>, or the location of a <a href="http://www.mongodb.org/display/DOCS/File+Based+Configuration" rel="nofollow">mongodb.conf file</a> using the -f or --config option, to inform the daemon of the location of your database, log file, IP bindings, etc. </p> <p>The mongod defaults assume that you database location is /data/db/. If this does not exist, or the daemon does not have permissions to that location, then the init script will fail.</p> <p>You should probably also run the daemon with a user account other than yourself or root (the default pacman package creates a user named mongodb), and give this user read/write access to the data path and log file.</p> <pre><code>[ -z "$PID" ] &amp;&amp; /bin/su mongodb -c "/usr/bin/mongod --config /etc/mongodb.conf --fork" &gt; /dev/null </code></pre> <p>I would suggest referring to the <a href="https://gist.github.com/3260682" rel="nofollow">mongodb init script</a> provided in the <a href="http://www.archlinux.org/packages/community/x86_64/mongodb/" rel="nofollow">Arch Community package</a>, and comparing that to what you have here. Or, install MongoDB using pacman, which sets all of this up for you.</p> <p>If all else fails, add some 'echo' commands inside of your <em>if</em> and <em>else</em> blocks to track down exactly where the init script is hanging, check mongodb's logs, and report back to us.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload