Permalink
Browse files

make nodejs.conf upstart start at boot

  • Loading branch information...
1 parent d0c4a56 commit 0df6f4571f412a26d60cb73befe7b3c3608cbaba @shimondoodkin committed Jun 28, 2010
Showing with 7 additions and 8 deletions.
  1. +7 −8 nodejs.conf
View
15 nodejs.conf
@@ -3,23 +3,22 @@ description "node.js server"
author "shimon doodkin"
# license: public domain
-start on startup
-stop on shutdown
+start on runlevel [2345]
+stop on runlevel [06]
script
export HOME="/root"
-
+
# one of the four lines below might work well:
-
- exec sudo -u www-data /bin/bash /var/www/nodejs.sh
- #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; done;'
+ exec sudo -u www-data /bin/bash /var/www/nodejs-mongodb-app/nodejs.sh
+
+ #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);}
-
+# try {code} catch(e){sys.puts(e.stack);}

0 comments on commit 0df6f45

Please sign in to comment.