equal
deleted
inserted
replaced
|
1 #!/usr/bin/perl |
|
2 |
|
3 use warnings; |
|
4 use strict; |
|
5 use File::Path; |
|
6 use DNStools::Config qw(get_config); |
|
7 |
|
8 # liest die Konfiguration ein |
|
9 my %config = get_config(); |
|
10 |
|
11 my $master_dir = $config{"master_dir"}; |
|
12 my $conf_dir = $config{"zone_conf_dir"}; |
|
13 |
|
14 for (@ARGV) { |
|
15 chomp(my $zone = `idn --quiet "$_"`); |
|
16 |
|
17 if (-d "$master_dir/$zone") { |
|
18 rmtree "$master_dir/$zone/" |
|
19 and print "zone-dir for $zone removed\n"; |
|
20 } |
|
21 else { |
|
22 print "$master_dir/$zone: $!\n"; |
|
23 } |
|
24 |
|
25 if (-e "$conf_dir/$zone") { |
|
26 unlink "$conf_dir/$zone" |
|
27 and print "configuration-file for $zone removed\n"; |
|
28 } |
|
29 else { |
|
30 print "$conf_dir/$zone: $!\n"; |
|
31 } |
|
32 } |