From a59731a3cc9c0fc6fba481e83d56ebd22ed3c87d Mon Sep 17 00:00:00 2001
From: dcy <dcy@ispconfig3>
Date: Sat, 17 Jul 2010 10:34:07 -0400
Subject: [PATCH] Secondary DNS functionality for PowerDNS and Bind
---
install/lib/installer_base.lib.php | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index e6409ae..0c14b1e 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -936,7 +936,20 @@
public function configure_bind() {
global $conf;
- //* Nothing to do
+ //* Check if the zonefile directory has a slash at the end
+ $content=$conf['bind']['bind_zonefiles_dir'];
+ if(substr($content,-1,1) != '/') {
+ $content .= '/';
+ }
+
+ //* Create the slave subdirectory
+ $content .= 'slave';
+ $content_mkdir = 'mkdir -p '.$content;
+ exec($content_mkdir);
+
+ //* Chown the slave subdirectory to $conf['bind']['bind_user']
+ exec('chown '.$conf['bind']['bind_user'].':'.$conf['bind']['bind_group'].' '.$content);
+ exec('chmod 770 '.$content);
}
--
Gitblit v1.9.1