From 51865fd8bfacc87e1ab85d560eb4f182a5d9113c Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sat, 19 Feb 2011 19:14:12 -0200 Subject: Enhancing check-puppetd.sh --- files/check-puppetd.sh | 17 ----------------- files/cron.d/puppetd | 1 - files/cron.d/puppetmaster | 1 - 3 files changed, 19 deletions(-) delete mode 100644 files/check-puppetd.sh (limited to 'files') diff --git a/files/check-puppetd.sh b/files/check-puppetd.sh deleted file mode 100644 index 10d6bc1..0000000 --- a/files/check-puppetd.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -# -# check if puppet is running -# - -PID="/var/run/puppet/agent.pid" -INIT="/etc/init.d/puppet" - -if [ ! -f "$PID" ]; then - $INIT start -else - running="$(ps $(cat $PID) &> /dev/null)" - if [ "$?" != "0" ]; then - sleep `echo $RANDOM/2000*60 | bc` - $INIT start - fi -fi diff --git a/files/cron.d/puppetd b/files/cron.d/puppetd index 5a45875..2cb9acf 100644 --- a/files/cron.d/puppetd +++ b/files/cron.d/puppetd @@ -1,3 +1,2 @@ # restart puppet once in a while and randomly delay the restart between 0 and 32 minutes -> splay puppetmaster hammering 0 22 * * */2 root sleep `echo $RANDOM/1000*60 | bc` && /etc/init.d/puppet restart > /dev/null - diff --git a/files/cron.d/puppetmaster b/files/cron.d/puppetmaster index 4ea0b66..8ddbe54 100644 --- a/files/cron.d/puppetmaster +++ b/files/cron.d/puppetmaster @@ -1,3 +1,2 @@ # we restart puppetmaster twice a day to avoid memory problems 58 11 * * * root /etc/init.d/puppetmaster restart > /dev/null - -- cgit v1.2.3