diff --git a/bin/gatherstats.pl b/bin/gatherstats.pl index 04da9bd..bb58252 100755 --- a/bin/gatherstats.pl +++ b/bin/gatherstats.pl @@ -41,7 +41,7 @@ my ($OptCheckgroupsFile,$OptClientsDB,$OptDebug,$OptGroupsDB,$OptTLH, $OptConfFile); GetOptions ('c|checkgroups=s' => \$OptCheckgroupsFile, 'clientsdb=s' => \$OptClientsDB, - 'd|debug!' => \$OptDebug, + 'd|debug+' => \$OptDebug, 'groupsdb=s' => \$OptGroupsDB, 'hierarchy=s' => \$OptTLH, 'hostsdb=s' => \$OptHostsDB, @@ -341,7 +341,7 @@ sub HostStats { &Bleat(2,sprintf("%s FAILED", $Header{'message-id'})) if !$Host; } - printf("%s: %s\n", $Header{'message-id'}, $Host) if $MID; + printf("%s: %s\n", $Header{'message-id'}, $Host) if ($MID or $Debug && $Debug >1); }; # delete old data for that month