Index: [Article Count Order] [Thread]

Date:  Mon, 13 Dec 2004 16:14:26 +0800
From:  patricko <patricko (at mark) staff.singnet.com.sg>
Subject:  [coba-e:01661] Logrotate for admserv
To:  coba-e (at mark) bluequartz.org
Message-Id:  <20041213161426.3253d7e8@localhost>
X-Mail-Count: 01661

Hi Blues,

I am back from Medical leaves.
from flu.

Sorry for the poor grammar later.


I have alter the apache logrotate for admserv
and it working.

/var/log/admserv/adm_access {
    daily
    prerotate
        rm -rf /home/tmp/.logrotate_admserv_access >/dev/null 2>&1
        cp /var/log/admserv/adm_access /home/tmp/.logrotate_admserv_access >/dev/null 2>&1
    endscript
    missingok
    postrotate
        /bin/kill -HUP `cat /var/run/admserv.pid 2>/dev/null` 2> /dev/null || true
        /usr/local/sbin/split_logs web < /home/tmp/.logrotate_admserv_access 
        rm -f /home/tmp/.logrotate_admserv_access >/dev/null 2>&1
    endscript
}

/var/log/admserv/adm_error {
    missingok
    postrotate
        /bin/kill -HUP `cat /var/run/admserv.pid 2>/dev/null` 2> /dev/null || true
    endscript
}

Cheers
Patrick