Index: [Article Count Order] [Thread]

Date:  Mon, 08 May 2006 19:38:40 +0200
From:  Ren=?ISO-8859-1?B?6SA=?=M=?ISO-8859-1?B?+A==?=lsted <molsted (at mark) iweb.dk>
Subject:  [coba-e:05089] Re: Automated vsite log rotate??
To:  <coba-e (at mark) bluequartz.org>
Message-Id:  <C0854EC0.B4E1%molsted (at mark) iweb.dk>
In-Reply-To:  <Pine.LNX.4.44.0605081406080.22118-100000 (at mark) staff.singnet.com.sg>
X-Mail-Count: 05089

On 08/05/06 8:10, "patricko (at mark) staff.singnet.com.sg"
<patricko (at mark) staff.singnet.com.sg> wrote:

> There isnt any vsite log rotation in current code base

Not to my knowledge.
We've put this in cron.monthly:

#### SCRIPT START ####
#!/bin/bash

DISABLED=0

DAYSTOKEEP=365

PATH=/home/sites/*/logs/

if [ $DISABLED = 1 ]; then
        exit
fi

find $PATH -mtime +$DAYSTOKEEP -exec rm {} \;

#### SCRIPT END ####

This would 'purge' logs for all vsites older than one year. It's easily
disabled (DISABLED=1)


-- 
Rene Molsted