Skip local hosts

tags/0.1.6_el5 0.1.6_el5
Daniel Berteaud 10 years ago
parent d2fa0188a7
commit 05fab71013
  1. 17
      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) . '"';
}
Loading…
Cancel
Save