diff --git a/scripts/remove_session b/scripts/remove_session index ccc90d7..de12ff2 100755 --- a/scripts/remove_session +++ b/scripts/remove_session @@ -16,13 +16,13 @@ my $ca = Simba::CA->new({ my $dbh = $ca->{dbh}; -for my $session (@ARGV[0]) { +for my $session (@ARGV) { print "deleting session $session\n"; my $n_instances = $dbh->do("delete from instances where session=?", {}, $session); print "\t$n_instances instances deleted\n"; # remove orphaned records: - $sessions + my $sessions = $dbh->selectcol_arrayref( q{select s.id from instances i right outer join sessions s on i.session=s.id where i.id is null} );