###
use vars qw( $opt_m $opt_a $opt_b $opt_r $opt_d $opt_v $opt_P );
-getopts('m:abr:dP:v:');
+getopts('m:abr:d:P:v:');
my %options = ();
foreach my $filename ( @$ls ) {
+ next if $opt_d && $filename eq $opt_d;
+
warn "Downloading $filename\n" if $opt_v;
#get the file
my @extra_values = ();
if ( $hash{'Status-Type'} eq 'Start' ) {
+ push @keys, 'AcctStartTime';
$dbhash{'AcctStartTime'} = $hash{'Date'};
$sql = 'INSERT INTO radacct ( '. join(',', @keys).
} elsif ( $hash{'Status-Type'} eq 'Stop' ) {
my $AcctSessionId = delete($dbhash{AcctSessionId});
+
+ push @keys, 'AcctStopTime';
$dbhash{'AcctStopTime'} = $hash{'Date'};
push @extra_values, $AcctSessionId;