various fixes for dns with froxlor-hostname
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
<?php
|
||||
|
||||
/***
|
||||
* Class DnsBase
|
||||
*
|
||||
* Base class for all DNS server configs
|
||||
*
|
||||
*/
|
||||
abstract class DnsBase {
|
||||
abstract class DnsBase
|
||||
{
|
||||
|
||||
protected $_logger = false;
|
||||
|
||||
@@ -81,6 +83,7 @@ abstract class DnsBase {
|
||||
$hostname_arr = array(
|
||||
'id' => 'none',
|
||||
'domain' => Settings::Get('system.hostname'),
|
||||
'isbinddomain' => '1',
|
||||
'isemaildomain' => Settings::Get('system.dns_createmailentry'),
|
||||
'customerid' => 'none',
|
||||
'loginname' => 'froxlor.panel',
|
||||
@@ -181,5 +184,4 @@ abstract class DnsBase {
|
||||
$this->_logger->logAction(CRON_ACTION, LOG_INFO, 'Dkim-milter reloaded');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ class bind extends DnsBase
|
||||
}
|
||||
// create zone-file
|
||||
$this->_logger->logAction(CRON_ACTION, LOG_DEBUG, 'Generating dns zone for ' . $domain['domain']);
|
||||
$zone = createDomainZone($domain['id'], $isFroxlorHostname);
|
||||
$zone = createDomainZone(($domain['id'] == 'none') ? $domain : $domain['id'], $isFroxlorHostname);
|
||||
$zonefile = (string)$zone;
|
||||
$domain['zonefile'] = 'domains/' . $domain['domain'] . '.zone';
|
||||
$zonefile_name = makeCorrectFile(Settings::Get('system.bindconf_directory') . '/' . $domain['zonefile']);
|
||||
|
||||
@@ -44,7 +44,7 @@ class pdns extends DnsBase
|
||||
}
|
||||
// create zone-file
|
||||
$this->_logger->logAction(CRON_ACTION, LOG_DEBUG, 'Generating dns zone for ' . $domain['domain']);
|
||||
$zone = createDomainZone($domain['id'], $isFroxlorHostname);
|
||||
$zone = createDomainZone(($domain['id'] == 'none') ? $domain : $domain['id'], $isFroxlorHostname);
|
||||
|
||||
$dom_id = $this->_insertZone($zone->origin, $zone->serial);
|
||||
$this->_insertRecords($dom_id, $zone->records);
|
||||
|
||||
Reference in New Issue
Block a user