Craigo Apprentice
Joined: 09 Aug 2002 Posts: 249 Location: /dev/life
|
Posted: Fri Aug 09, 2002 4:06 pm Post subject: Logrotate.. a small guide (need help ;) |
|
|
(replace vim with your favourite editor!!)
1) vim /etc/logrotate.conf and put in:
include /etc/logrotate.d
2) mkdir /etc/logrotate.d
3) cd /etc/logrotate.d
4) vim sysklogd and put in:
compress
/var/log/messages {
rotate 5
weekly
postrotate
/sbin/killall -HUP syslogd
}
3) cd cron.daily
4) vim logmove and put in
#!/bin/sh
/usr/sbin/logrotate /etc/logrotate.conf
5) chmod 755 /etc/cron.daily/logmove
6) Sit back and pray it will move the logs around!!
So far, I'm uncertain if this would work? Help please! I will be back on monday to check this (unfortuantly but it would be interesting to see if it works on 2 of my boxes here at work!!)
Thanks in advance |
|