[TriLUG] Server script question

Marc Wiatrowski wia at iglass.net
Wed Jul 12 13:41:30 EDT 2006


> -----Original Message-----
> From: WA Brown
> Sent: Wednesday, July 12, 2006 1:27 PM
> To: Triangle Linux Users Group discussion list
> Subject: Re: [TriLUG] Server script question
> 
> This is exactly how I added the command. Is this correct?
> 
> 0 0 * * * mail -s 'log files' youremail at domain.extension  
> /path/to/log/files
> 
> 
> I hope this is correct.
> 

I hope its not "exactly" like that?  Did you change the email address and the
file/path info?  Think you would need to redirect those files too...

Also if you wanted to get a copy every time your logs rotate, with logrotate
you could use a config like:

/usr/local/apache/logs/access_log /usr/local/apache/logs/error_log {
    daily
    sharedscripts
    postrotate
        mail -s 'log files' youremail at domain.extension < /usr/local/apache/logs/access_log.1
        mail -s 'log files' youremail at domain.extension < /usr/local/apache/logs/error_log.1     
    endscript
}

hope this helps,
marc





More information about the TriLUG mailing list