aboutsummaryrefslogtreecommitdiffstats
path: root/debian
diff options
context:
space:
mode:
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog8
-rwxr-xr-xdebian/sitesummary.cron.daily16
2 files changed, 24 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index ce502bb..6b7cb86 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+sitesummary (0.0.13~1) unstable; urgency=low
+
+ * Change server cron job to remove entries after 120 days.
+ * Make it possible to override this value using
+ /etc/sitesummary/collector.cfg.
+
+ -- Petter Reinholdtsen <pere@debian.org> Wed, 4 Oct 2006 23:29:18 +0200
+
sitesummary (0.0.12) unstable; urgency=low
* Modify the system info collector script to ignore non-true exit
diff --git a/debian/sitesummary.cron.daily b/debian/sitesummary.cron.daily
index ca37ce5..21fa686 100755
--- a/debian/sitesummary.cron.daily
+++ b/debian/sitesummary.cron.daily
@@ -1,4 +1,20 @@
#!/bin/sh
+#
+# Author: Petter Reinholdtsen
+
+daylimit=120
+
+[ -f /etc/sitesummary/collector.cfg ] && . /etc/sitesummary/collector.cfg
+
+entriesdir=/var/lib/sitesummary/entries
+
+remove_old_entries() {
+ find $entriesdir/. -mindepth 1 -maxdepth 1 -type d \
+ -daystart -mtime +$daylimit -print0 |
+ xargs -0 -r rm -rf
+}
+
+[ -d $entriesdir ] && remove_old_entries
# Update the web report once a day