suppression en masse d'utilisateurs et de zones
This commit is contained in:
parent
ff0e511f56
commit
cefcbef4c4
31
cli/users_del.pl
Normal file
31
cli/users_del.pl
Normal file
@ -0,0 +1,31 @@
|
||||
#!/usr/bin/perl -w
|
||||
use v5.14;
|
||||
use autodie;
|
||||
use utf8;
|
||||
use open qw/:std :utf8/;
|
||||
use Modern::Perl;
|
||||
|
||||
use Data::Dump qw( dump );
|
||||
|
||||
use lib './lib/';
|
||||
use configuration ':all';
|
||||
use app;
|
||||
|
||||
if( @ARGV != 0 ) {
|
||||
say "usage : echo user | ./$0";
|
||||
exit 1;
|
||||
}
|
||||
|
||||
eval {
|
||||
my $app = app->new(get_cfg());
|
||||
|
||||
while (<>) {
|
||||
chomp;
|
||||
say "delete user: $_";
|
||||
$app->delete_user($_);
|
||||
}
|
||||
};
|
||||
|
||||
if( $@ ) {
|
||||
say q{Une erreur est survenue. } . $@;
|
||||
}
|
31
cli/zones_del.pl
Normal file
31
cli/zones_del.pl
Normal file
@ -0,0 +1,31 @@
|
||||
#!/usr/bin/perl -w
|
||||
use v5.14;
|
||||
use autodie;
|
||||
use utf8;
|
||||
use open qw/:std :utf8/;
|
||||
use Modern::Perl;
|
||||
|
||||
use lib './lib/';
|
||||
use configuration ':all';
|
||||
use encryption ':all';
|
||||
use app;
|
||||
|
||||
if( @ARGV != 0 ) {
|
||||
say "usage : echo ndd | ./$0";
|
||||
exit 1;
|
||||
}
|
||||
|
||||
eval {
|
||||
my $app = app->new(get_cfg());
|
||||
|
||||
while (<>) {
|
||||
chomp ;
|
||||
say "zone to delete: $_";
|
||||
|
||||
$app->delete_domain( $_ );
|
||||
}
|
||||
};
|
||||
|
||||
if( $@ ) {
|
||||
say q{Une erreur est survenue. } . $@;
|
||||
}
|
Reference in New Issue
Block a user