[thelist] help with logrotate...please
Jake Aust
mail_lists at jakesdiner.com
Wed Apr 24 21:11:01 CDT 2002
I am having a heck of a time with logrotate on my Linux web server.
I am trying to get my logs to be renamed with the date added after they've
been rotated. Here is my logrotate.d/apache file
--------------------------------------------------------
/home/virtual/lovejoyc/var/log/httpd/access_log {
daily
rotate 365
missingok
postrotate
mv /home/virtual/lovejoyc/var/log/httpd/access_log.1.gz
/home/virtual/lovejoyc/var/log/httpd/access_log.`date '+%Y-%m-%d'`.gz
/usr/bin/killall -HUP httpd
endscript
--------------------------------------------------------
It just doesn't rename my file. I end up with the same old format:
"access_log.1.gz"
It works on the command line, but not in the script. What am I doing wrong?
I want to have logfiles that look like this:
access_log.2002-04-24.gz
access_log.2002-04-25.gz
etc.
Jake Aust
More information about the thelist
mailing list