#!/bin/sh
# Run the Smail error checking script and rotate the logfiles.
# We have to rotate the logs as root as otherwise we can't fix the
# timestamps, and so we might as well add the checkerr script here
# too.
test -f /usr/sbin/smail || exit 0
cd /tmp

echo "Cron job - running checkerr" | logger
/usr/lib/smail/checkerr

set -e
cd /var/log/smail
savelog -u root -g mail -m 644 -c 7 logfile paniclog >/dev/null

