aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetter Reinholdtsen <pere@hungry.com>2010-01-26 08:17:27 +0000
committerPetter Reinholdtsen <pere@hungry.com>2010-01-26 08:17:27 +0000
commitc83aca7e7b7fd38e45b2a2738fa156df76f8e507 (patch)
tree852412debbabf689b4c4861e20331cb3c905d19c
parentecd7d82d31d5d25217296f7fdb5827cc2e2e4b65 (diff)
downloadsitesummary-c83aca7e7b7fd38e45b2a2738fa156df76f8e507.tar.gz
sitesummary-c83aca7e7b7fd38e45b2a2738fa156df76f8e507.tar.bz2
sitesummary-c83aca7e7b7fd38e45b2a2738fa156df76f8e507.tar.xz
Remove entries in the cron job before munin and nagios
configuration is updated, to not monitor removed hosts another day.
-rw-r--r--debian/changelog3
-rwxr-xr-xdebian/sitesummary.cron.daily4
2 files changed, 5 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index 81fcbc1..f3ffd49 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,9 @@ sitesummary (0.0.59) UNRELEASED; urgency=low
* Restructure cron job, move munin and nagios updating code to
separate scripts to make it possible to update them individually.
+ * Remove entries in the cron job before munin and nagios
+ configuration is updated, to not monitor removed hosts another
+ day.
-- Petter Reinholdtsen <pere@debian.org> Tue, 26 Jan 2010 08:56:53 +0100
diff --git a/debian/sitesummary.cron.daily b/debian/sitesummary.cron.daily
index bc7022d..ee63ac9 100755
--- a/debian/sitesummary.cron.daily
+++ b/debian/sitesummary.cron.daily
@@ -25,6 +25,8 @@ remove_old_entries() {
-exec /usr/lib/sitesummary/expire-entry '{}' \;
}
+[ -d $entriesdir ] && remove_old_entries
+
if [ -x /usr/sbin/sitesummary-update-nagios ] ; then
/usr/sbin/sitesummary-update-nagios
fi
@@ -33,7 +35,5 @@ if [ -x /usr/sbin/sitesummary-update-munin ] ; then
/usr/sbin/sitesummary-update-munin
fi
-[ -d $entriesdir ] && remove_old_entries
-
# Update the web report once a day
[ -x $makewebreport ] && nice $makewebreport