logrotation
Hi,
Here is an entry in my logrotate.conf file: # RPM packages drop log rotation information into this directory include /etc/logrotate.d I put five different scripts into /etc/logrotate.d/syslog. Now I am wondering if I have to add an entry into my logrotate.conf file like the one below (3rd line down) for this to work: # RPM packages drop log rotation information into this directory include /etc/logrotate.d include /etc/logrotate.d/syslog In /etc/logrotate.d/syslog by default there was this entry below: /var/log/messages /var/log/secure /var/log/maillog /var/log/spooler /var/log/boot.log /var/log/cron { sharedscripts postrotate /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true endscript } The log files mentioned above are rotating properly without an entry in logrotate.conf (inlcude /etc/logrotate.d/syslog). I'm just not sure if i'm not seeing any rotation yet because the 5 logfiles i created are set for monthly rotation. That makes sense to me but confirmation would be nice. Would it be easier to put the 5 scripts i created right into logrotate.conf? Below is one of my scripts. /var/log/syslog { monthly rotate 12 postrotate /usr/bin/killall -HUP syslogd endscript } Also, are there specific permissions which i might have to set on /etc/logrotate.d/syslog? Thanks, |
Quote:
|
What I've done is put the scripts in /etc/logrotate.d. Now I have /etc/logrotate.d/syslog as well as /etc/logrotate.d/script 1......script 5 for a total of 6 scripts in /etc/logrotate.d. I assume this should also work because of the "include" statement in logrotate.conf. I've taken out the statement /etc/logrotate.d/syslog since I moved my scripts out of this location.
|
That will work fine, but it does create an unecessary amount of files, why not just type your scripts directly into one of the conf files?
|
All times are GMT -5. The time now is 09:52 AM. |