Skip to content

Instantly share code, notes, and snippets.

@Dieterbe
Created June 4, 2012 19:30
Show Gist options
  • Save Dieterbe/2870337 to your computer and use it in GitHub Desktop.
Save Dieterbe/2870337 to your computer and use it in GitHub Desktop.
upstart initscript for statsd
description "Statsd upstart initscript"
author "Dieter Plaetinck <dieter@vimeo.com>"
# based on http://newcome.wordpress.com/2012/02/26/running-programs-as-linux-daemons-using-upstart/
# Stanzas
#
# Stanzas control when and how a process is started and stopped
# See a list of stanzas here: http://upstart.ubuntu.com/wiki/Stanzas#respawn
# When to start the service
start on runlevel [2345]
# When to stop the service
stop on runlevel [016]
# Automatically restart process if crashed
respawn
exec /usr/bin/node /usr/lib/nodejs/statsd/stats.js /etc/statsd.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment