Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- env APP_HOME=~/app/
- env NODE_ENV=production
- env RUN_AS_USER=www-data
- start on (net-device-up
- and local-filesystems
- and runlevel [2345])
- stop on runlevel [016]
- respawn
- respawn limit 5 60
- pre-start script
- test -x /usr/local/bin/node || { stop; exit 0; }
- test -x $APP_HOME/bin/cluster || { stop; exit 0; }
- test -e $APP_HOME && test -e $APP_HOME/logs || { stop; exit 0; }
- end script
- script
- chdir $APP_HOME
- 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
- end script
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement