Skip to content

Instantly share code, notes, and snippets.

@BretFisher
Created September 10, 2013 18:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BretFisher/6513994 to your computer and use it in GitHub Desktop.
Save BretFisher/6513994 to your computer and use it in GitHub Desktop.
# Ubuntu upstart file at /etc/init/mms-agent.conf
description "MongoDB Monitoring Service (MMS) Agent"
pre-start script
mkdir -p /var/log/mms-agent/
end script
post-stop script
echo "$(date +'%Y-%m-%d %T,000') INFO mms-agent stopped" >> /var/log/mms-agent/agent.log
end script
start on runlevel [2345]
stop on runlevel [06]
exec nohup /usr/bin/env python /opt/mms-agent/agent.py >> /var/log/mms-agent/agent.log 2>&1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment