X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fsbin%2Frt-shredder.in;h=f1e79f8bfb8e24104ea56cd2c44250f0617e1152;hb=4e7efe58f1a20dfc4fd306fad2c14c8040585be1;hp=946121c7536aed5efb2335dfc8821bf037e87121;hpb=fc6209f398899f0211cfcedeb81a3cd65e04a941;p=freeside.git diff --git a/rt/sbin/rt-shredder.in b/rt/sbin/rt-shredder.in index 946121c75..f1e79f8bf 100755 --- a/rt/sbin/rt-shredder.in +++ b/rt/sbin/rt-shredder.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -74,11 +74,11 @@ should wipeout. =head2 --sqldump -Outputs INSERT queiries into file. This dump can be used to restore data +Outputs INSERT queries into file. This dump can be used to restore data after wiping out. -By default creates files -F<< /var/data/RT-Shredder/-XXXX.sql >> +By default creates files named F<< -XXXX.sql >> in the current +directory. =head2 --object (DEPRECATED) @@ -135,7 +135,10 @@ BEGIN { } -use RT::Shredder (); +use RT -init; + +require RT::Shredder; + use Getopt::Long qw(GetOptions); use File::Spec (); @@ -146,8 +149,7 @@ our %plugins = RT::Shredder::Plugin->List; our %opt; parse_args(); -RT::Shredder::Init( %opt ); -my $shredder = new RT::Shredder; +my $shredder = RT::Shredder->new; { my $plugin = eval { $shredder->AddDumpPlugin( Arguments => { @@ -257,7 +259,7 @@ sub process_plugins my @res; foreach my $str( @{ $opt{'plugin'} } ) { - my $plugin = new RT::Shredder::Plugin; + my $plugin = RT::Shredder::Plugin->new; my( $status, $msg ) = $plugin->LoadByString( $str ); unless( $status ) { print STDERR "Couldn't load plugin\n";