#! /bin/sh
#
# apache	Rotate the apache logsfiles daily.
#

[ -d /var/log/apache/. ] || exit 0
umask 022

# Take care of the standard logfiles.
cd /var/log/apache
if [ -f access.log ]
then
  savelog -c 7 access.log > /dev/null
fi
if [ -f error.log ]
then
  savelog -c 7 error.log > /dev/null
fi

# Send a reload signal to the apache server.
if [ -f /var/run/apache/apache.pid ]
then
  kill -1 `cat /var/run/apache/apache.pid` 2>/dev/null
fi

