Re: logrotate and more...

mattg <[email protected]> Fri, 04 Apr 2003 15:40:28 -0500
Newsgroups gmane.network.mathopd
Message-ID <[email protected]>
do you want to make the changes that michiel recommended?
if so, i'll wait to put it on the mathopd how-to i wrote.
if not, i'll put it up now.


-- 
mattg - [email protected]
[hello to all my fans in domestic surveillance]

Thomas E. Horner wrote:
> 
> on your site http://apathy.guiltyparty.org/u/doc/mathopd/
> i found the following:
> 
> 
> if you use logrotate to manage /var/log, create a file called "mathopd" 
> in /etc/logrotate.d/ and insert this:
> /var/log/mathopd/log.* {
> weekly
> missingok
> rotate 7
> compress
> create 640 daemon daemon
> sharedscripts
> postrotate
> killall mathopd
> sleep 5
> /usr/local/sbin/mathopd < /etc/mathopd.conf
> endscript
> }
> 
> 
> 
> which kills mathopd.
> that's bad housekeeping and unnessacary.
> 
> see the attached file (an init-script) i wrote.
> 
> option 'force-nextlog' reopens the log, which is
> given by
>     Log /var/mathopd/log/%Y-%m-%d
> in mathopd.conf.
> 
> at 00:00:00 daily cron executes the script
>     /etc/init.d/mathopd force-nextlog
> so i get a daily log without any extra program.
> 
> 
> it was originally written for suse linux and
> it needs some customizing but can do a great job.
> you can put it on your web-page if you'd like to.