adding dnssec support
This commit is contained in:
@ -37,7 +37,11 @@ if ($changecount) {
|
||||
# If we made any changes, then generate the full vhost list
|
||||
my ($fh, $path) = tempfile();
|
||||
foreach my $i (sort {$a->{zone} cmp $b->{zone}} @vh) {
|
||||
print $fh "zone \"$i->{zone}\" { type master; file \"/var/lib/bind/vhost/db.$i->{zone}\"; };\n";
|
||||
if ($ddns->is_dnssec($i->{zone})) {
|
||||
print $fh "zone \"$i->{zone}\" { type master; file \"/var/lib/bind/vhost/db.$i->{zone}.signed\"; };\n";
|
||||
} else {
|
||||
print $fh "zone \"$i->{zone}\" { type master; file \"/var/lib/bind/vhost/db.$i->{zone}\"; };\n";
|
||||
}
|
||||
}
|
||||
close $fh;
|
||||
print "Installing new vhost list\n";
|
||||
|
||||
@ -53,7 +53,11 @@ sub do_rewrite {
|
||||
print "Differences found; rewriting slave file.\n";
|
||||
|
||||
foreach my $i (sort {$a->{zone} cmp $b->{zone}} @vh) {
|
||||
print $fh "zone \"$i->{zone}\" { type slave; file \"/var/cache/bind/db.$i->{zone}\"; masters { $i->{master}; }; };\n";
|
||||
if ($ddns->is_dnssec($i->{zone})) {
|
||||
print $fh "zone \"$i->{zone}\" { type slave; file \"/var/cache/bind/db.$i->{zone}.signed\"; masters { $i->{master}; }; };\n";
|
||||
} else {
|
||||
print $fh "zone \"$i->{zone}\" { type slave; file \"/var/cache/bind/db.$i->{zone}\"; masters { $i->{master}; }; };\n";
|
||||
}
|
||||
}
|
||||
close $fh;
|
||||
print "Installing new slave host list\n";
|
||||
|
||||
Reference in New Issue
Block a user