#!/bin/bash

DSCLIB="/var/lib/dsc-statistics"
DSCCACHE="/var/cache/dsc-statistics"
NUMDAYS=7

PATH="/sbin:/usr/sbin:/usr/local/sbin:/bin/:/usr/bin:/usr/local/bin"

if [ -x /usr/share/dsc-statistics-presenter/remove-xmls ]; then find -L $DSCLIB | /usr/share/dsc-statistics-presenter/remove-xmls $NUMDAYS; fi
if [ -d $DSCCACHE ]; then find -L $DSCCACHE -daystart -mtime +$NUMDAYS -type f | xargs --no-run-if-empty rm; fi
