Skip to content

Instantly share code, notes, and snippets.

@eaton
Created April 27, 2013 04:56
Show Gist options
  • Save eaton/5471929 to your computer and use it in GitHub Desktop.
Save eaton/5471929 to your computer and use it in GitHub Desktop.
An upstart script for node.js thingabobbers. From http://www.slideshare.net/the_undefined/nodejs-best-practices-10428790
#!upstart
description "appname"
author "authorname"
start on (local-filesystems and net-device-up IFACE=eth0)
stop on shutdown
respawn # restart when job dies
respawn limit 5 60 # give up after 5 respawns in 60 seconds
script
exec sudo -u www-data /path/to/server.js >> /var/log/appname.log 2>&1
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment