On Tue, Apr 27, 2004 at 11:12:39PM -0500, Conrad Sabatier wrote:
> 
> On 27-Apr-2004 Toad wrote:
> > On Thu, Apr 08, 2004 at 09:11:17PM -0500, Conrad Sabatier wrote:
> >> Just noticed after I had uploaded the log rotate script that the date
> >> command
> >> was being used in two locations.  Stoopid.
> > 
> > Uhm, what exactly is this supposed to do?
> 
> Well, you know, rotate the log file.  :-)
> 
> > If you are not using
> > logRotate=true in the config file, then the node will just keep writing
> > to the first logfile, so it gets longer and longer and longer...
> 
> The script archives the log file and clears it as well.

Won't work.
You have to restart the node.
The node writes to the fd, not the file.
> 
> [snippet of script]
> 
> # Copy log to new file
> cp $FREENET_LOG "freenet.log-$d"
> 
> # Right here is where the log gets "cleared" (overwritten, to be more precise)
> echo Log rotated at $d > $FREENET_LOG
> 
> # Compress new log archive
> bzip2 -fq "freenet.log-$d"
> 
> chown freenet:freenet "freenet.log-$d.bz2"
> 
> exit 0
> 
> -- 
> Conrad Sabatier <[EMAIL PROTECTED]> - "In Unix veritas"
> 
> _______________________________________________
> Support mailing list
> [EMAIL PROTECTED]
> http://news.gmane.org/gmane.network.freenet.support
> Unsubscribe at http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/support
> Or mailto:[EMAIL PROTECTED]

-- 
Matthew J Toseland - [EMAIL PROTECTED]
Freenet Project Official Codemonkey - http://freenetproject.org/
ICTHUS - Nothing is impossible. Our Boss says so.

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Support mailing list
[EMAIL PROTECTED]
http://news.gmane.org/gmane.network.freenet.support
Unsubscribe at http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/support
Or mailto:[EMAIL PROTECTED]

Reply via email to