#!/bin/sh
cd /hosts
if [ $# -lt 1 ] ; then
	HOSTS="`find * -maxdepth 0 -type d`"
else
	HOSTS="$*"
fi
export PATH=/opt/webalizer/bin:$PATH
for x in $HOSTS ; do
	webalizer -p -N 5 -D /var/run/webalizer-dns-cache.db -n $x -o $x/stats $x/logs/access.log
done

