--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/zone-rm Thu Jan 13 00:20:26 2011 +0100
@@ -0,0 +1,33 @@
+#!/usr/bin/perl
+
+use warnings;
+use strict;
+use File::Path;
+use FindBin;
+use DNStools::Config qw(get_config);
+
+# liest die Konfiguration ein
+my %config = get_config("$FindBin::Bin/dnstools.conf", "/etc/dnstools.conf");
+
+my $master_dir = $config{"master_dir"};
+my $conf_dir = $config{"zone_conf_dir"};
+
+for (@ARGV) {
+ chomp(my $zone = `idn --quiet "$_"`);
+
+ if (-d "$master_dir/$zone") {
+ rmtree "$master_dir/$zone/"
+ and print "zone-dir for $zone removed\n";
+ }
+ else {
+ print "$master_dir/$zone: $!\n";
+ }
+
+ if (-e "$conf_dir/$zone") {
+ unlink "$conf_dir/$zone"
+ and print "configuration-file for $zone removed\n";
+ }
+ else {
+ print "$conf_dir/$zone: $!\n";
+ }
+}