nsbin/cron/webalizer.cron-v0.2

33 lines
767 B
Groff
Raw Normal View History

#!/bin/sh
# Date: 27. May 1999
# Author: Nico Schottelius ( webmaster@schottelius.org )
# webalizer.cron; do webalizer for every server
# Last Modified: 20. Mai 2003
# Version : 1.02
# Preperations
# unset / set varibales
SERV=""
WEBALIZER="/usr/bin/nice -n 20 webalizer -c"
ERR_LOG="/var/log/webalizer.err"
STD_LOG="/var/log/webalizer.log"
## Startup
echo Starting at : `date`
# MAIN
for SERV in `find /home/server/www/ -name webalizer.conf`; do
echo "Using $SERV"
LOGDIR=`dirname $SERV`/..
for log in $LOGDIR/access.log $LOGDIR/access.log.1; do
echo "$log ..."
$WEBALIZER $SERV $log
cat $log | $WEBALIZER $SERV
done
zcat $LOGDIR/access*.gz | $WEBALIZER $SERV
done
## Shutdown
echo Stopping at : `date`