Skip to content

Instantly share code, notes, and snippets.

@marcoceppi
Created January 16, 2014 16:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcoceppi/8458344 to your computer and use it in GitHub Desktop.
Save marcoceppi/8458344 to your computer and use it in GitHub Desktop.
Node.js upstart script
description "{{app_name}} node.js server"
author "Daniele Stroppa <daniele.stroppa@joyent.com>"
start on (local-filesystems and net-device-up IFACE!=lo)
stop on runlevel [06]
respawn
respawn limit 5 3
setuid {{app_user}}
setgid {{app_user}}
env HOME="/home/{{app_user}}"
env NODE_PATH="/usr/lib/node"
exec /usr/bin/node {{{install_root}}}/{{app_name}}/server.js >> /var/log/{{app_name}}.log 2>&1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment