#!/bin/sh
# httpd.conf: <virtual host>... CustomLog /var/log/httpd/`virtual-host-name`-al
# </virtual host>
# cd /etc/webalizer; ls ====>>>> `virtual-host-name1.conf virtual-host-name2.conf .......
# this script invokes `webalizer` passing it each log file name which
# is turned into the conf file
# minus the -al on the end
# name for properties to be read from
cd /var/log/httpd; ls -al | sed -n 's/\(.\)-al/\1/p' | awk '
BEGIN { i = 0 }
{ cmd="/usr/bin/webalizer -c /etc/webalizer/"$0".conf";
system(cmd);
i++; }
END { print i }'
exit 0
return to top