add experimental bind-cron for testing purposes

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2016-05-11 18:10:17 +02:00
parent 9b5ce83e8b
commit 0404618c24
2 changed files with 20 additions and 13 deletions

View File

@@ -19,6 +19,7 @@
// necessary includes
require_once makeCorrectFile(dirname(__FILE__) . '/cron_tasks.inc.dns.10.bind.php');
require_once makeCorrectFile(dirname(__FILE__) . '/cron_tasks.inc.dns.15.bind.php');
require_once makeCorrectFile(dirname(__FILE__) . '/cron_tasks.inc.http.10.apache.php');
require_once makeCorrectFile(dirname(__FILE__) . '/cron_tasks.inc.http.15.apache_fcgid.php');
require_once makeCorrectFile(dirname(__FILE__) . '/cron_tasks.inc.http.20.lighttpd.php');
@@ -179,11 +180,14 @@ while ($row = $result_tasks_stmt->fetch(PDO::FETCH_ASSOC)) {
* TYPE=4 MEANS THAT SOMETHING IN THE BIND CONFIG HAS CHANGED. REBUILD froxlor_bind.conf IF BIND IS ENABLED
*/
elseif ($row['type'] == '4' && (int)Settings::Get('system.bind_enable') != 0) {
$bindclass ="bind2";
if (!isset($nameserver)) {
$nameserver = new bind($cronlog);
$nameserver = new $bindclass($cronlog);
}
if (Settings::Get('dkim.use_dkim') == '1') {
if (Settings::Get('dkim.use_dkim') == '1' && $bindclass == 'bind') {
$nameserver->writeDKIMconfigs();
}