Skip to content

Instantly share code, notes, and snippets.

@phumpal
Last active October 21, 2015 20:34
Show Gist options
  • Select an option

  • Save phumpal/df0a720ee4e9fd534a34 to your computer and use it in GitHub Desktop.

Select an option

Save phumpal/df0a720ee4e9fd534a34 to your computer and use it in GitHub Desktop.
This is a simple upstart config for sensu-client
description "sensu-client"
start on filesystem or runlevel [2345]
stop on runlevel [!2345]
respawn
chdir /opt/sensu
pre-start script
exec su - sensu -c "/opt/sensu/.rvm/wrappers/ruby-2.0.0-p647/sensu-client -b -d /etc/sensu -l /var/log/sensu/sensu-client.log -p /var/run/sensu/sensu-client.pid"
end script
post-stop script
if [ -f /var/run/sensu/sensu-client.pid ]; then
kill -s QUIT `cat /var/run/sensu/sensu-client.pid`
rm -f /var/run/sensu/sensu-client.pid
fi
sleep 1
end script
@phumpal
Copy link
Author

phumpal commented Oct 21, 2015

The sensu-client was installed via rvm + gem install and not via apt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment