Re: logrotate and more...
"Thomas E. Horner" <[email protected]> Sat, 05 Apr 2003 10:39:43 +0000
| Newsgroups | gmane.network.mathopd |
|---|---|
| Message-ID | <[email protected]> |
At 20:40 04.04.2003, you wrote: >do you want to make the changes that michiel recommended? no, cause the scripts runs perfect now for about two years. restarting always works. what michiel probably didn't see was that you should normally use the 'safe-restart' and 'safe-stop' options and not the 'restart' and 'stop' options. i wrote start, stop and restart first, before reading the full source of mathopd. after discovering mathopds reaction souce code on signals (which is nowhere documented!!) i wrote the remaining options. and about log-rotation: see it as an addon. i can mathopd make reopen the log whenever i like to. >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. >