Skip to content

Instantly share code, notes, and snippets.

@malteo
Created April 10, 2013 14:06
Show Gist options
  • Save malteo/5354940 to your computer and use it in GitHub Desktop.
Save malteo/5354940 to your computer and use it in GitHub Desktop.
Upstart script
# /etc/init/uptime.conf
description "uptime"
author "malte"
start on runlevel [2345]
stop on runlevel [^2345]
# Restart when job dies
respawn
# Give up restart after 5 respawns in 60 seconds
respawn limit 5 60
script
chdir /home/libersoft/uptime
export NODE_ENV=production
exec /usr/bin/node app.js 2>&1 >> /var/log/uptime.log
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment