@daily munin-async [ -d /var/lib/munin-async ] && find /var/lib/munin-async -maxdepth 1 -type f -mtime +30 -delete
@daily root [ -d /var/lib/puppet/clientbucket ] && find /var/lib/puppet/clientbucket -type f -mtime +60 -delete && find /var/lib/puppet/clientbucket -type d -empty -delete
+
+@hourly root ! [ -x /usr/local/sbin/ntp-restart-if-required ] || /usr/local/sbin/ntp-restart-if-required
--- /dev/null
+#!/bin/bash
+
+[ -e /usr/lib/nagios/plugins/dsa-check-timedatectl ] || exit
+
+/usr/lib/nagios/plugins/dsa-check-timedatectl -s 2>/dev/null
+rc=$?
+
+case "$rc" in
+ 1|2)
+ pid=$(pgrep -u ntp ntp)
+ if [ -z "$pid" ]; then
+ service ntp restart
+ exit
+ fi
+
+ age=$(ps -ho etimes "$pid")
+ if [ "$age" -gt 3600 ]; then
+ service ntp restart
+ fi
+ ;;
+ *)
+ ;;
+esac
file { '/etc/ntp.keys.d/ntpkey_iff_busoni':
ensure => absent,
}
+ file { '/usr/local/sbin/ntp-restart-if-required':
+ source => 'puppet:///modules/ntp/ntp-restart-if-required',
+ mode => '0555',
+ }
}