From 6a25accffe0c2818e00dc3ad5dd3eb3a47c76291 Mon Sep 17 00:00:00 2001
From: A. Täffner <darkalex@firesplash.de>
Date: Fri, 22 Jan 2016 13:11:31 -0500
Subject: [PATCH] import previous work (not working completely yet)
---
server/plugins-available/bind_plugin.inc.php | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/server/plugins-available/bind_plugin.inc.php b/server/plugins-available/bind_plugin.inc.php
index c538cb9..3dd2f84 100644
--- a/server/plugins-available/bind_plugin.inc.php
+++ b/server/plugins-available/bind_plugin.inc.php
@@ -163,7 +163,14 @@
if(is_file($filename)) unlink($filename);
if(is_file($filename.'.err')) unlink($filename.'.err');
- }
+
+ //* DNSSEC-Implementation
+ if (strlen($data['old']['origin']) > 3) exec('/usr/local/ispconfig/server/scripts/dnssec-delete.sh '.$data['old']['origin']); //delete old keys
+ exec('/usr/local/ispconfig/server/scripts/dnssec-create.sh '.$data['new']['origin']); //Create new keys for new origin
+ }
+
+ //* DNSSEC-Implementation
+ exec('/usr/local/ispconfig/server/scripts/dnssec-update.sh '.$data['new']['origin']);
//* Restart bind nameserver if update_acl is not empty, otherwise reload it
if($data['new']['update_acl'] != '') {
@@ -197,6 +204,9 @@
if(is_file($zone_file_name.'.err')) unlink($zone_file_name.'.err');
$app->log("Deleting BIND domain file: ".$zone_file_name, LOGLEVEL_DEBUG);
+ //* DNSSEC-Implementation
+ exec('/usr/local/ispconfig/server/scripts/dnssec-delete.sh '.$data['old']['origin']); //delete keys
+
//* Reload bind nameserver
$app->services->restartServiceDelayed('bind', 'reload');
@@ -342,7 +352,7 @@
//* Loop trough zones
foreach($tmps as $tmp) {
- $zone_file = $pri_zonefiles_path.str_replace("/", "_", substr($tmp['origin'], 0, -1));
+ $zone_file = $pri_zonefiles_path.str_replace("/", "_", substr($tmp['origin'], 0, -1)).'.signed'; //.signed is for DNSSEC-Implementation
$options = '';
if(trim($tmp['xfer']) != '') {
--
Gitblit v1.9.1