diff --git a/root/etc/e-smith/templates/etc/awstats/domain.conf/050SkipHosts b/root/etc/e-smith/templates/etc/awstats/domain.conf/050SkipHosts new file mode 100644 index 0000000..a941550 --- /dev/null +++ b/root/etc/e-smith/templates/etc/awstats/domain.conf/050SkipHosts @@ -0,0 +1,17 @@ +{ + +use esmith::NetworksDB; +my $n = esmith::NetworksDB->open_ro() || die "couldn't open networks DB\n"; +my @local = (); +foreach my $net ($n->networks){ + my $key = $net->key; + my $mask = $net->prop('Mask'); + my $prefix = esmith::util::computeLocalNetworkPrefix($key,$mask); + $prefix =~ s/\./\\./g; + $prefix = 'REGEX[^' . $prefix . ']'; + push @local, $prefix; +} + +$OUT .= 'SkipHosts="' . join(' ', @local) . '"'; + +}