Restart BIND after zone signing http://virtualmin.com/node/25927

This commit is contained in:
Jamie Cameron
2013-07-24 05:47:56 -07:00
parent dfcc5fb9af
commit 877896eb05
2 changed files with 7 additions and 0 deletions

View File

@@ -16,6 +16,7 @@ my $period = $config{'dnssec_period'} || 21;
@zones = &list_zone_names();
$errcount = 0;
$donecount = 0;
foreach $z (@zones) {
# Get the key
next if ($z->{'type'} ne 'master');
@@ -70,6 +71,10 @@ foreach $z (@zones) {
elsif ($debug) {
print STDERR " Re-signed $z->{'name'} OK\n";
}
$donecount++ if (!$err);
}
}
if ($donecount) {
&restart_bind();
}
exit($errcount);

View File

@@ -14,6 +14,8 @@ $dom = $zone->{'name'};
$err = &sign_dnssec_zone($zone, 1);
&error($err) if ($err);
&unlock_file(&make_chroot(&absolute_path($zone->{'file'})));
$err = &restart_zone($zone->{'name'}, $zone->{'view'});
&error($err) if ($err);
# Return to master page
&webmin_log("sign", undef, $dom);