diff options
author | Petter Reinholdtsen <pere@hungry.com> | 2006-10-04 21:35:15 +0000 |
---|---|---|
committer | Petter Reinholdtsen <pere@hungry.com> | 2006-10-04 21:35:15 +0000 |
commit | 32664946d075dfd4dc3a47bf75caf835f7ad1e71 (patch) | |
tree | a457ebaa0a498e6a887b39c01781e8ef3382b13d | |
parent | 83f81903820a620b6166b825eafcb67d6c8fd797 (diff) | |
download | sitesummary-32664946d075dfd4dc3a47bf75caf835f7ad1e71.tar.gz sitesummary-32664946d075dfd4dc3a47bf75caf835f7ad1e71.tar.bz2 sitesummary-32664946d075dfd4dc3a47bf75caf835f7ad1e71.tar.xz |
* Change server cron job to remove entries after 120 days.
* Make it possible to override this value using
/etc/sitesummary/collector.cfg.
-rw-r--r-- | debian/changelog | 8 | ||||
-rwxr-xr-x | debian/sitesummary.cron.daily | 16 |
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 |