bin/zone-rm
changeset 103 0c9f37c94f0c
parent 96 26c6306bd9cc
child 113 30bd047cd057
equal deleted inserted replaced
102:3000f3962b14 103:0c9f37c94f0c
     1 #!/usr/bin/perl 
     1 #!/usr/bin/perl 
     2 
     2 
     3 use v5.10;
     3 use v5.10;
     4 use warnings;
     4 use warnings;
     5 use strict;
     5 use strict;
     6 use File::Path qw(remove_tree);
     6 use File::Path;
     7 use DNStools::Config qw(get_config);
     7 use DNStools::Config qw(get_config);
     8 use Net::LibIDN qw(:all);
     8 use Net::LibIDN qw(:all);
     9 use Pod::Usage;
     9 use Pod::Usage;
    10 use Getopt::Long;
    10 use Getopt::Long;
    11 
    11 
    43             print "Remove $utf8zone ($zone)? [y/n]: ";
    43             print "Remove $utf8zone ($zone)? [y/n]: ";
    44             chomp($_ = <STDIN>);
    44             chomp($_ = <STDIN>);
    45             next if not /^y(?:es)?$/i;
    45             next if not /^y(?:es)?$/i;
    46         }
    46         }
    47 
    47 
    48         remove_tree("$cf{master_dir}/$zone", "$cf{zone_conf_dir}/$zone",
    48         rmtree("$cf{master_dir}/$zone", "$cf{zone_conf_dir}/$zone",
    49             { verbose => 1 });
    49             { verbose => 1 });
    50 
    50 
    51     }
    51     }
    52 }
    52 }
    53 
    53