light9
10/6/2013 - 3:33 PM

Use Runit for running NodeJS in Ubuntu as Service better use: http://kvz.io/blog/2009/12/15/run-nodejs-as-a-service-on-ubuntu-karmic/

Use Runit for running NodeJS in Ubuntu as Service better use: http://kvz.io/blog/2009/12/15/run-nodejs-as-a-service-on-ubuntu-karmic/

#Then, you should make this "run" script executeable by
chmod a+x run
#Telling runit for our application by doing symbolic link into /etc/service.
sudo ln -s /etc/sv/hello-derby /etc/service/
sv start nodejs
sudo apt-get install runit
cd /etc/sv
mkdir hello-derby
sudo chown -R www-data:www-data hello-derby
cd hello-derby
nano run
#!/bin/sh
cd /srv/www/derby/hello-derby
exec 2>&1
exec chpst -U www-data node server.js >> /srv/www/derby/hello-derby/node.log 2>&