X-Git-Url: https://code.th-h.de/?p=usenet%2Fnewsstats.git;a=blobdiff_plain;f=bin%2Fgatherstats.pl;h=6096417ba72906b037e68456f0a1cce9c5cda826;hp=92d054522596065d927318f338e491948d6c22a7;hb=ea91003a99e679caa5bf56915f085a7c4931805b;hpb=dfc2b81c37c38c2b7bcc8afeead0ec927845b90f diff --git a/bin/gatherstats.pl b/bin/gatherstats.pl index 92d0545..6096417 100755 --- a/bin/gatherstats.pl +++ b/bin/gatherstats.pl @@ -38,7 +38,7 @@ my %LegalStats; ### read commandline options my ($OptCheckgroupsFile,$OptClientsDB,$OptDebug,$OptGroupsDB,$OptTLH, - $OptHostsDB,$OptMonth,$OptRawDB,$OptStatsType,$OptTest); + $OptHostsDB,$OptMonth,$OptRawDB,$OptStatsType,$OptTest,$OptConfFile); GetOptions ('c|checkgroups=s' => \$OptCheckgroupsFile, 'clientsdb=s' => \$OptClientsDB, 'd|debug!' => \$OptDebug, @@ -49,11 +49,12 @@ GetOptions ('c|checkgroups=s' => \$OptCheckgroupsFile, 'rawdb=s' => \$OptRawDB, 's|stats=s' => \$OptStatsType, 't|test!' => \$OptTest, + 'conffile=s' => \$OptConfFile, 'h|help' => \&ShowPOD, 'V|version' => \&ShowVersion) or exit 1; ### read configuration -my %Conf = %{ReadConfig('')}; +my %Conf = %{ReadConfig($OptConfFile)}; ### override configuration via commandline options my %ConfOverride; @@ -161,7 +162,7 @@ foreach my $Month (&ListMonth($Period)) { } }; }; - + # delete old data for that month if (!$OptTest) { $DBQuery = $DBHandle->do(sprintf("DELETE FROM %s.%s WHERE month = ?", @@ -207,7 +208,7 @@ gatherstats - process statistical data from a raw source =head1 SYNOPSIS -B [B<-Vhdt>] [B<-m> I | I] [B<-s> I] [B<-c> I]] [B<--hierarchy> I] [B<--rawdb> I] [B<-groupsdb> I] [B<--clientsdb> I] [B<--hostsdb> I] +B [B<-Vhdt>] [B<-m> I | I] [B<-s> I] [B<-c> I]] [B<--hierarchy> I] [B<--rawdb> I] [B<-groupsdb> I] [B<--clientsdb> I] [B<--hostsdb> I] [--conffile I] =head1 REQUIREMENTS @@ -340,6 +341,10 @@ Override I from F. Override I from F. +=item B<--conffile> I + +Load configuration from I instead of F. + =back =head1 INSTALLATION