#!/bin/bash CONF_DIR="/etc/awstats" CONF_EXT="conf" AWSTATS="/usr/share/awstats/wwwroot/cgi-bin/awstats.pl" if [ ! -d "$CONF_DIR" ]; then echo "$CONF_DIR does not exist" exit 1 else cd $CONF_DIR fi for cfg in *.$CONF_EXT; do if [ "$cfg" != "awstats.model.conf" ]; then site=`echo $cfg|sed -e "s/awstats.//g" | sed -e "s/.conf//g"` $AWSTATS -update -config="$site" fi done