Skip to content

Commit

Permalink
rewind 'notify no' change
Browse files Browse the repository at this point in the history
  • Loading branch information
hb9cwp committed Nov 21, 2016
1 parent fd20ca5 commit 06b0648
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions dns/pfSense-pkg-bind9/files/usr/local/pkg/bind.inc
Original file line number Diff line number Diff line change
Expand Up @@ -587,9 +587,18 @@ EOD;
log_error("[bind] {$key_restored} DNSSEC keys restored from XML backup for {$zonename} zone.");
}
$dnssec_bin = "/usr/local/sbin/dnssec-keygen";
if ($zonereverso == "on") {
if ($zonereversv6o == "on") {
$z = "${zonename}.ip6.arpa";
} else {
$z = "${zonename}.in-addr.arpa";
}
} else {
$z = $zonename;
}
if (file_exists($dnssec_bin) && $key_restored == 0) {
exec("{$dnssec_bin} -K " . CHROOT_LOCALBASE . "/etc/namedb/keys {$zonename}", $kout);
exec("{$dnssec_bin} -K " . CHROOT_LOCALBASE . "/etc/namedb/keys -fk {$zonename}", $kout);
exec("{$dnssec_bin} -K " . CHROOT_LOCALBASE . "/etc/namedb/keys {$z}", $kout);
exec("{$dnssec_bin} -K " . CHROOT_LOCALBASE . "/etc/namedb/keys -fk {$z}", $kout);
foreach ($kout as $filename) {
chown(CHROOT_LOCALBASE . "/etc/namedb/keys/{$filename}.key", "bind");
chown(CHROOT_LOCALBASE . "/etc/namedb/keys/{$filename}.private", "bind");
Expand Down

0 comments on commit 06b0648

Please sign in to comment.