summaryrefslogtreecommitdiff
path: root/files
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2011-02-19 19:14:12 -0200
committerSilvio Rhatto <rhatto@riseup.net>2011-02-19 19:14:12 -0200
commit51865fd8bfacc87e1ab85d560eb4f182a5d9113c (patch)
treef05f5ca584fd8bdbd18309d095c2bca3be81e050 /files
parent1ce6003bf9710c1b75885a65b48fe8d638398e87 (diff)
downloadpuppet-puppet-51865fd8bfacc87e1ab85d560eb4f182a5d9113c.tar.gz
puppet-puppet-51865fd8bfacc87e1ab85d560eb4f182a5d9113c.tar.bz2
Enhancing check-puppetd.sh
Diffstat (limited to 'files')
-rw-r--r--files/check-puppetd.sh17
-rw-r--r--files/cron.d/puppetd1
-rw-r--r--files/cron.d/puppetmaster1
3 files changed, 0 insertions, 19 deletions
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
-