Hi!
Done som tuning on my logrotation with the following tweaking. The problem is that I get the following error-messages when try to run the code below:
error: syslog :1 lines must begin with a keyword or a filename (possibly in dou ble quotes)
error: syslog :2 unexpected text
error: syslog :3 unexpected text
error: syslog
rerotate or postrotate without endscript
And this is the code (in the file /etc/logrotate.d/syslog):
/var/log/auth.log \
/var/log/cron.log \
/var/log/daemon.log \
/var/log/kern.log \
/var/log/lpr.log \
/var/log/user.log \
/var/log/uucp.log {
weekly
sharedscripts
prerotate
chattr -a \
/var/log/auth.log \
/var/log/cron.log \
/var/log/daemon.log \
/var/log/kern.log \
/var/log/lpr.log \
/var/log/user.log \
/var/log/uucp.log
endscript
rotate 12
postrotate
/usr/bin/killall -HUP syslogd
chattr +a \
/var/log/auth.log \
/var/log/cron.log \
/var/log/daemon.log \
/var/log/kern.log \
/var/log/lpr.log \
/var/log/user.log \
/var/log/uucp.log
endscript
}
/var/log/critical.log \
/var/log/emergency.log \
/var/log/error.log \
/var/log/info.log {
daily
sharedscripts
prerotate
chattr -a \
/var/log/critical.log \
/var/log/emergency.log \
/var/log/error.log \
/var/log/info.log
endscript
rotate 7
postrotate
/usr/bin/killall -HUP syslogd
chattr +a \
/var/log/critical.log \
/var/log/emergency.log \
/var/log/error.log \
/var/log/info.log
endscript
}
/var/log/mail.log {
monthly
sharedscripts
prerotate
chattr -a \
/var/log/mail.log
endscript
rotate 12
postrotate
/usr/bin/killall -HUP syslogd
chattr +a \
/var/log/mail.log
endscript
}
Thanx in advance!!
Tommy