nsbin/cron/webalizer.cron-v0.2
Nico Schottelius df2daf524d init
Signed-off-by: Nico Schottelius <nico@manager.schottelius.org>
2017-07-19 17:15:41 +02:00

32 lines
767 B
Bash

#!/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`