From: Peter Palfrader Date: Thu, 2 Jul 2009 16:01:20 +0000 (+0200) Subject: monit: Wait for a few more cycles before we touch cron. X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;ds=sidebyside;h=8609b9f14152dcb9b4b6ff706f664de0f345c6f1;p=mirror%2Fdsa-puppet.git monit: Wait for a few more cycles before we touch cron. Also, do not stop cron but restart it in that target, and do away with the dedicated running stop/start block. sgran says this isn't crazy, so commit quickly before he changes his mind. --- diff --git a/modules/monit/files/puppet b/modules/monit/files/puppet index bed0a14b6..d1f5085c0 100644 --- a/modules/monit/files/puppet +++ b/modules/monit/files/puppet @@ -14,12 +14,7 @@ check file puppetstate if timestamp > 90 minutes for 9 cycles then exec "/etc/init.d/puppet stop" depends on puppetd -check process cron with pidfile /var/run/crond.pid - start program = "/etc/init.d/cron start" - stop program = "/etc/init.d/cron stop" - if 5 restarts within 5 cycles then timeout - check file cronalive with path /var/cache/dsa/cron.alive - if timestamp > 120 minutes for 5 cycles then exec "/etc/init.d/cron stop" - depends on cron + # a cycle is 5 minutes, 24 cycles is thus 2 hours + if timestamp > 120 minutes for 24 cycles then exec "/etc/init.d/cron restart"