Commit 364c4e07 authored by mh's avatar mh
Browse files

make it possible to deploy monit

parent 8a36fff6
......@@ -3,8 +3,10 @@
# GPLv3
#
# install and manage imapproxy
class imapproxy (
$manage_shorewall = false
$manage_shorewall = false,
$manage_monit = false,
) {
case $::operatingsystem {
gentoo: { include imapproxy::gentoo }
......@@ -14,4 +16,7 @@ class imapproxy (
if $manage_shorewall {
include shorewall::rules::out::imap
}
if $manage_monit {
include imapproxy::monit
}
}
# a monit snippet for imapproxy
class imapproxy::monit {
$service_cmd = $::operatingsystem ? {
debian => '/usr/sbin/service',
default => '/sbin/service'
}
monit::check::process{'imapproxy':
pidfile => '/var/run/imapproxy.pid',
start => "${service_cmd} imapproxy start",
stop => "${service_cmd} imapproxy stop",
customlines => [ 'if 5 restarts within 5 cycles then timeout' ],
require => Service['imapproxy'],
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment