Date: Sun, 23 Jan 2011 09:10:15 -0500 From: "Grant Peel" <gpeel@thenetnow.com> To: <freebsd-questions@freebsd.org> Subject: Logrotate Message-ID: <7186153209294859990C5839A572C20F@GRANTLAPTOP>
next in thread | raw e-mail | index | archive | help
Hi all,
Not sure if there is a better list to ask this, so here goes.
I use logrotate to rotate the apache log files within each domains log
directory. They are in the home directory as such:
/home/domain1.com/logs/access_log
/home/domain2.com/logs/access_log
/home/domain3.com/logs/access_log
...
In the home directory, I also have symlinks that point to specific domain
directories, example
cd /home
domain1.ca -> domain1.com
domain1.net -> domain1.com
domain1.org -> domain1.com
someothername.com -> domain1.com
...
All this have beein said, when I use logrotate, it rotates the logs within
the directories that have sym links pointing to them over and over again. In
the case of domain1.com, the log would be rotated 5 times.
I am using a logrotate.conf container that looks like so:
# more logrotate.conf
...
/home/*/logs/access_log {
missingok
rotate 14
daily
create 644 root
}
...
So, obviously because I am using a wildcard within the container logrotate
is going through the symlinks and rotating the logs over and over.
Is there a way or method to ignore the symlinks (or a workaround) that
anyone knows of, other than making a logrotate.conf container for each
individal directory.
Thanks all,
-Grant
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7186153209294859990C5839A572C20F>
