X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fdebian_org%2Ftemplates%2Fdsa-puppet-stuff.cron.erb;fp=modules%2Fdebian_org%2Ftemplates%2Fdsa-puppet-stuff.cron.erb;h=5b739dc8f3ef3d6a9ee2501f64a66fabc22f9fd6;hb=dbc41cd7676f72feb971b2e2bff579bf57386e8a;hp=8134608403675b50409331fe3d4280d54e84ad54;hpb=a6ce8dcbae87844cc1e695f44bcc184b8d4e995d;p=mirror%2Fdsa-puppet.git diff --git a/modules/debian_org/templates/dsa-puppet-stuff.cron.erb b/modules/debian_org/templates/dsa-puppet-stuff.cron.erb index 813460840..5b739dc8f 100644 --- a/modules/debian_org/templates/dsa-puppet-stuff.cron.erb +++ b/modules/debian_org/templates/dsa-puppet-stuff.cron.erb @@ -1,13 +1,9 @@ @hourly root [ ! -d /var/cache/dsa ] || touch /var/cache/dsa/cron.alive -<% if scope.call_function('versioncmp', [@puppetversion.to_s, '3.0.0']) <= 0 -%> -34 */4 * * * root if [ -x /usr/sbin/puppetd ]; then sleep $(( $RANDOM \% 7200 )); if [ -x /usr/bin/timeout ]; then TO="timeout --kill-after=900 3600"; else TO=""; fi; tmp="$(tempfile)"; egrep -v '^(#|$)' /etc/dsa/cron.ignore.dsa-puppet-stuff > "$tmp" && $TO /usr/sbin/puppetd -o --no-daemonize 2>&1 | egrep --text -v -f "$tmp"; rm -f "$tmp"; fi -<% else -%> # run every 90 minutes 34 */3 * * * root if [ -x /usr/bin/puppet ]; then sleep $(( $RANDOM \% 2200 )); if [ -x /usr/bin/timeout ]; then TO="timeout --kill-after=900 2000"; else TO=""; fi; tmp="$(tempfile)"; egrep -v '^(#|$)' /etc/dsa/cron.ignore.dsa-puppet-stuff > "$tmp" && $TO /usr/bin/puppet agent --onetime --no-daemonize 2>&1 | egrep --text -v -f "$tmp"; rm -f "$tmp"; fi 4 1-23/3 * * * root if [ -x /usr/bin/puppet ]; then sleep $(( $RANDOM \% 2200 )); if [ -x /usr/bin/timeout ]; then TO="timeout --kill-after=900 2000"; else TO=""; fi; tmp="$(tempfile)"; egrep -v '^(#|$)' /etc/dsa/cron.ignore.dsa-puppet-stuff > "$tmp" && $TO /usr/bin/puppet agent --onetime --no-daemonize 2>&1 | egrep --text -v -f "$tmp"; rm -f "$tmp"; fi -<% end -%> @hourly root sleep $(( $RANDOM \% 300 )); if [ -x /usr/lib/nagios/plugins/dsa-check-stunnel-sanity ] && [ -e /etc/stunnel/puppet-ekeyd.conf ] && ! /usr/lib/nagios/plugins/dsa-check-stunnel-sanity > /dev/null && grep -q '^client = yes' /etc/stunnel/puppet-ekeyd.conf; then /usr/sbin/service stunnel4 restart > /dev/null; fi