--- a/local.pm.ex-2 Thu Jul 14 10:03:39 2016 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-# Example
-
-# remove the next line if you know, what you're doing
-#die "Sure? You should adapt this file to your needs!";
-
-package local;
-
-# in: zone name
-# src ip
-# out: 0 failure ($@ contains message)
-# !0 ok ($@ may contain message)
-sub addZone($$) {
- my ($zone, $src) = @_;
- my $hdns = '84.19.194.5';
-
- # Filename ist für das File selbst und auch für die Konfig
- (my $file = $zone) =~ s/[\/&|]/_/g;
-
- # 84.19.194.5 ist die ip unseres hidden master
- my $transferees = $src eq $hdns ? 'localhost; key hh.schlittermann.de' : 'none';
-
- my $txt = <<__;
-{
- type slave;
- file "/etc/cache/bind/slave/$file";
- masters { $src; };
- allow-query { any; };
- allow-transfer { $transferees; };
-};
-
-__
-
- # set
- # allow-new-zones yes;
- # in /etc/bind/named.conf.options
- system rndc => (
- addzone => $zone,
- $txt
- );
-
- if ($?) {
- warn "rndc addzone $zone failed\n";
- return 0;
- }
-
- $@ = "zone $zone added via rndc addzone\n";
- return 1;
-
-}
-
-1;
-# vim:sts=4 sw=4 aw ai sm: