Advertisement
Guest User

Untitled

a guest
Apr 1st, 2015
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. env APP_HOME=~/app/
  2. env NODE_ENV=production
  3. env RUN_AS_USER=www-data
  4.  
  5. start on (net-device-up
  6. and local-filesystems
  7. and runlevel [2345])
  8. stop on runlevel [016]
  9.  
  10. respawn
  11. respawn limit 5 60
  12.  
  13. pre-start script
  14. test -x /usr/local/bin/node || { stop; exit 0; }
  15. test -x $APP_HOME/bin/cluster || { stop; exit 0; }
  16. test -e $APP_HOME && test -e $APP_HOME/logs || { stop; exit 0; }
  17. end script
  18.  
  19. script
  20. chdir $APP_HOME
  21. exec /usr/local/bin/node bin/cluster app.js -u $RUN_AS_USER -l logs/app.out -e logs/app.err >> $APP_HOME/logs/upstart.log
  22. end script
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement