#!/bin/bash

# Cronjob to clean up /data/fax directory

# Remove old fax files which were successfully processed
if [ -d /data/fax/good ] ; then

        find /data/fax/good -name '*.pdf' -type f -mtime 7 -print0 | xargs -0 --no-run-if-empty /bin/rm -f
        find /data/fax/good -name '*.mail' -type f -mtime 7 -print0 | xargs -0 --no-run-if-empty /bin/rm -f
fi

exit 0
