Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 24 lines (16 sloc) 759 Bytes
description "node.js server"
author "shimon doodkin"
# license: public domain
start on runlevel [2345]
stop on runlevel [06]
export HOME="/root"
# one of the four lines below might work well:
exec sudo -u www-data /bin/bash /var/www/nodejs-mongodb-app/
#exec sudo -u www-data /bin/bash -c 'while true; do /usr/local/bin/node /var/www/server.js 2>&1 >> /var/log/nodejs.log; sleep 1$
#exec /usr/local/bin/node /var/www/server.js 2>&1 >> /var/log/nodejs.log
#exec sudo -u www-data /usr/local/bin/node /var/www/server.js 2>&1 >> /var/log/nodejs.log
end script
# insted of useing monit i did: a shell while true script and used inside the server request loop:
# try {code} catch(e){sys.puts(e.stack);}
Something went wrong with that request. Please try again.