/var/log/gestion/gestion.log {
daily copytruncate rotate 30 mail root@localhost #nomail postrotate /opt/gestion/Binaries/log_scan_errors endscript nocompress
}
/var/log/gestion/events.log {
daily copytruncate rotate 30 mail root@localhost prerotate /opt/gestion/Binaries/sort_events /var/log/gestion/events.log /tmp/gestion_events.log SUBJ="Events from $( hostname )" #if [ -x /usr/bin/mutt ]; then # echo "Gestion log-file" | mutt -s "$SUBJ" -a /tmp/gestion_events.log -- root@localhost #else MAIL=/usr/bin/bsd-mailx if [ ! -x $MAIL ]; then MAIL=/usr/bin/mail fi cat /tmp/gestion_events.log | $MAIL -s "$SUBJ" root@localhost #fi rm /tmp/gestion_events.log endscript nocompress
}