The "cat" command works fine but I can't get it to log it daily.
The config file is /etc/logrotate.d/syslog The first couple of lines read :
/var/log/messages {
postrotate
/usr/bin/killall -HUP syslogd
endscript
}
I have changed it to :
/var/log/messages {
prerotate
cat var/log/messages | mail -s ""
jadmin@myhost.com
endscript
}
Is the above correct?
Should I keep the original postrotate line and add the prerotate?
As the way I have it does not do the email
Any suggestions.....
I tried adding the following (as an example):