Created
April 27, 2013 04:56
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!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