From: Peter Palfrader Date: Wed, 26 Aug 2009 08:43:23 +0000 (+0200) Subject: Run puppet sync with timeout(1) if it's installed X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=381122c2ab40e9b48a52d6f0f27812687a988fbf;p=mirror%2Fdsa-puppet.git Run puppet sync with timeout(1) if it's installed --- diff --git a/files/etc/cron.d/dsa-puppet-stuff b/files/etc/cron.d/dsa-puppet-stuff index 72724ee03..f3aa1a5ba 100644 --- a/files/etc/cron.d/dsa-puppet-stuff +++ b/files/etc/cron.d/dsa-puppet-stuff @@ -1,3 +1,3 @@ SHELL=/bin/bash @hourly root [ ! -d /var/cache/dsa ] || touch /var/cache/dsa/cron.alive -34 */4 * * * root [ ! -x /usr/sbin/puppetd ] || ( sleep $(( $RANDOM \% 3600 )) && /usr/sbin/puppetd --factsync -o --no-daemonize ) +34 */4 * * * root if [ -x /usr/sbin/puppetd ]; then sleep $(( $RANDOM \% 3600 )); if [ -x /usr/bin/timeout ]; then TO="timeout 3600"; else TO=""; fi; $TO /usr/sbin/puppetd --factsync -o --no-daemonize ; fi