#!/bin/sh

/usr/sbin/logrotate /etc/logrotate.conf
EXITVALUE=$?
if [ $EXITVALUE != 0 ]; then
    /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
	#remove any previous log file that could prevent the next run
	rm -f /var/lib/logrotate/status
fi
exit 0
