Created
January 16, 2014 16:42
-
-
Save marcoceppi/8458344 to your computer and use it in GitHub Desktop.
Node.js upstart script
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
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