adding dnssec support

This commit is contained in:
2020-11-21 16:11:41 -05:00
parent 8d05bd540c
commit ab0a52c30e
4 changed files with 36 additions and 7 deletions

View File

@ -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";

View File

@ -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";