Skip to content

Instantly share code, notes, and snippets.

@marfarma
Forked from shapeshed/monit.conf
Created June 8, 2012 18:15
Show Gist options
  • Save marfarma/2897364 to your computer and use it in GitHub Desktop.
Save marfarma/2897364 to your computer and use it in GitHub Desktop.
Upstart script for monit on Ubuntu 10.04
# This is an event.d (upstart) script to keep monit running.
# To install disable the old way of doing things:
#
# /etc/init.d/monit stop && update-rc.d -f monit remove
#
# then put this script here:
#
# /etc/init/monit.conf
#
# and reload upstart configuration:
#
# initctl reload-configuration
#
# You can manually start and stop monit like this:
#
# start monit
# stop monit
#
# Michael Hale (http://halethegeek.com)
# Martin Pala (http://www.mmonit.com)
# George Ornbo (http://shapeshed.com)
description "Monit service manager"
limit core unlimited unlimited
start on runlevel [2345]
stop on runlevel [!2345]
expect daemon
respawn
exec /usr/sbin/monit -c /etc/monitrc
pre-stop exec /usr/sbin/monit -c /etc/monitrc quit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment