Skip to content

Commit

Permalink
updated docs for using Upstart
Browse files Browse the repository at this point in the history
  • Loading branch information
julianlam committed May 8, 2015
1 parent 5e4ac76 commit 51a64a1
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions running/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,34 @@ The preferred way to start and stop NodeBB is by invoking its executable:
The methods listed below are alternatives to starting NodeBB via the executable.


Upstart
-----------------------

Later version of Ubuntu may utilise `Upstart <http://upstart.ubuntu.com/>`_ to manage processes at boot.
Upstart also handles restarts of scripts if/when they crash.

You can use Upstart to start/stop/restart your NodeBB.

Note: Prior to NodeBB v0.7.0, Upstart processes would not track the proper pid, meaning there was no way to stop the NodeBB process.
NodeBB v0.7.0 includes some changes that allow Upstart to control NodeBB more effectively.

You can utilise this Upstart configuration as a template to manage your NodeBB:

.. code::
start on startup
stop on runlevel [016]
respawn
setuid someuser
setgid someuser
script
cd /path/to/nodebb
node loader.js --no-silent --no-daemon
end script
From there, you can start stop and restart NodeBB as the root user: ``start nodebb``, ``stop nodebb``, ``restart nodebb``, assuming ``nodebb.conf`` is the name of the Upstart config file.


Simple Node.js Process
-----------------------

Expand Down

0 comments on commit 51a64a1

Please sign in to comment.