#!/bin/bash

# Get the current year and month
CURYEAR=`date +%Y`
CURMONTH=`date +%m`

for hostname in brink.st brinkautoimport.nl dannyfine.nl fractalgee.com hayka.nl isitweekendyet.com mostsexymen.com nerdgod.org nilicule.com oslocity.org rc.vc rc6.org studio5-0.com theweekendhaslanded.org tiramteatret.org mixes.nilicule.com
do
	# bash check if directory exists
	if [ ! -d "/var/www/htdocs/domains/rc.vc/subdomains/stats.rc.vc/$hostname" ]; then
		mkdir "/var/www/htdocs/domains/rc.vc/subdomains/stats.rc.vc/$hostname"
	fi
	
	# Analyze logfiles
   	/usr/bin/webalizer -n http://$hostname -o /var/www/htdocs/domains/rc.vc/subdomains/stats.rc.vc/$hostname /var/log/lighttpd/$CURYEAR/$CURMONTH/$hostname-access_log
done

