Re: logrotate and more...
Michiel Boland <[email protected]> Fri, 4 Apr 2003 21:35:09 +0200 (CEST)
| Newsgroups | gmane.network.mathopd |
|---|---|
| Message-ID | <[email protected]> |
> killall mathopd > sleep 5 > /usr/local/sbin/mathopd < /etc/mathopd.conf > endscript > } > > > > which kills mathopd. What one could do is kill mathopd with SIGUSR2, which should cause a silent and graceful death, but which leaves a window of time (5 seconds) during which no server runs. > 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. Actually you do not even need to do this with mathopd 1.4. It will reopen the log file automatically every hour. Cheers Michiel