mirror of
https://github.com/webmin/webmin.git
synced 2026-06-20 11:20:30 +01:00
Restart BIND after zone signing http://virtualmin.com/node/25927
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user