#!/home/product/code/webui-perl/bin/perl -T -I /home/product/code/firmware/current/lib/perl5
#SUDOER_USERS: nobody
#SUDOER_RUNAS_USERS: root, mta
#SUDOER_TAGS: NOPASSWD, EXEC
use strict;
use warnings;
use Barracuda::Sudo::Lib;

###############################################################################

=pod

=head1 NAME

remove_bayes BASE_DIR

=head1 DESCRIPTION

Script to remove a user's bayesian directory and associated log directory.

=head1 ARGUMENTS

=over

* BASE_DIR :: The user directory that should be removed.

=back

=cut

###############################################################################

my ($base) = get_argv(dir_prefix("/mail/bayes/db/"));

system_succeed('/bin/rm', '-fr', $base, "$base.log");
