Created
December 6, 2013 22:09
-
-
Save augustj/7832982 to your computer and use it in GitHub Desktop.
Upstart script for New Relic Redis agent
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
# | |
# This is provided as an example of a Ubuntu style upstart script | |
# You'll want to give it a more useful name | |
# | |
# pivotal_agent - myservice job file | |
description "Pivotal Monitoring Agent for New Relic" | |
author "Pivotal - https://github.com/gopivotal/newrelic_pivotal_agent/" | |
# Change this to the user running the agent | |
env USER=newrelic | |
# When to start the service | |
start on runlevel [2345] | |
# When to stop the service | |
stop on runlevel [016] | |
# Automatically restart process if crashed | |
respawn | |
# Run before process | |
pre-start script | |
[ -d /var/log/pivotal_agent ] || mkdir -p /var/log/pivotal_agent | |
end script | |
# This assumes that start-stop-daemon is present on the system | |
# Change this to the path where pivotal_agent is located | |
exec start-stop-daemon --start --make-pidfile --pidfile /var/run/pivotal_agent.pid --chuid $USER --exec /home/augustj/.rbenv/shims/ruby /etc/newrelic_redis_agent/pivotal_agent |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment