d1rk
6/5/2012 - 8:04 AM

upstart initscript for statsd

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