zone-rm
changeset 43 7e472c559b36
parent 38 d50f6874b7ab
parent 42 2baba9f77020
child 46 de6761ce0d5b
--- a/zone-rm	Fri Dec 03 16:42:12 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-#!/usr/bin/perl -w
-
-use strict;
-use File::Path;
-use FindBin;
-
-# liest die Konfiguration ein
-my @configs = ( "$FindBin::Bin/dnstools.conf", "/etc/dnstools.conf" );
-my %config;
-
-foreach ( grep {-f} @configs ) {
-    open( CONFIG, $_ ) or die "Can't open $_: $!\n";
-}
-
-unless ( seek( CONFIG, 0, 0 ) ) {
-    die "Can't open config (searched: @configs)\n";
-}
-
-while (<CONFIG>) {
-    chomp;
-    s/#.*//;
-    s/\t//g;
-    s/\s//g;
-    next unless length;
-    my ( $cname, $ccont ) = split( /\s*=\s*/, $_, 2 );
-    $config{$cname} = $ccont;
-}
-close(CONFIG);
-
-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";
-    }
-}