1 2 3
#!/bin/sh /usr/sbin/logrotate /etc/logrotate.conf [ $? != 0 ] && /usr/bin/logger -t logrotate "ALERT - exited abnormally."