Hi,

is there a built-in way (like a place holder) to figure out what name a
rotated log file has been given by logrotate?

Here's what I'm trying to do:


,---- [ cat /etc/logrotate.d/exim }
| /var/log/exim/exim*.log {
|         daily
|         missingok
|         rotate 800
|         compress
|         delaycompress
|         notifempty
|         create 640 mail mail
|         postrotate
|                 /usr/sbin/eximstats <name-of-rotated-file> | mail -s 
"eximstats" root
|         endscript
| }
`----


I want <name-of-rotated-file> replaced with the name the log file that
has been rotated has been renamed to.  I can think of ways to do this
otherwise, like writing a script that figures out the name of the file,
or using 'prerotate' instead.

It just won't make any sense if logrotate doesn't already have some kind
of place holder for this.

Reply via email to