Skip to content
This repository has been archived by the owner on Nov 26, 2020. It is now read-only.

Improved upstart script #58

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 4 additions & 24 deletions extras/pivotal_agent-upstart.conf
Original file line number Diff line number Diff line change
@@ -1,29 +1,9 @@
#
# 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=sysadmin

# 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 /opt/newrelic_pivotal_agent/pivotal_agent
setuid nobody
setgid nogroup
console log
exec /opt/newrelic_pivotal_agent/pivotal_agent