#!/bin/sh

# Rotates server log files, without affecting users who may be
# connected to the server.

# This can be run as a cron script

DATE=`date +%d-%h`
ROOTDIR=`dirname $0`

# Add here any additional logfiles you want rotated.
LOGS='access errors secure'


(cd $ROOTDIR/logs;

 for i in $LOGS; do
   if [ -f $i ]; then
     mv $i $i.$DATE
   fi
 done)

$ROOTDIR/restart
