On Tue, 2004-03-02 at 08:37, Brian Hoover wrote:

> The problem I'm trying to solve is rotating the qmail-queue.log file.  My rotate 
> script creates a new file sets the owner & permissions then moves the original file 
> and moves the new file to qmail-queue.log.  
> 
> cd /var/spool/qmailscan
> touch ./qmail-queue.log.1
> chmod 600 ./qmail-queue.log.1
> chown qscand:root ./qmail-queue.log.1
> mv ./qmail-queue.log ./qmail-queue.log.uc
> mv ./qmail-queue.log.1 ./qmail-queue.log
> 
> The problem is that the log is not used until I restart qmail.  
> How should this file be properly rotated?

Don't delete the file.  Instead, copy it if you want a back log. Then
Just pipe text into the old file.

ie:

cp /var/log /var/log.1
echo "restart" > /var/log

You are right, if you delete the file, you have to restart qmail.

-- 
Russel Oliver
[EMAIL PROTECTED]
http://www.techsane.com



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Qmail-scanner-general mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/qmail-scanner-general

Reply via email to