dns: no separate zonefiles for ismainbutsubto domains 1/3

move log message
This commit is contained in:
Daniel Reichelt
2016-06-17 19:22:45 +02:00
parent 5f9962b6ba
commit a400fc9c65
3 changed files with 63 additions and 58 deletions

View File

@@ -98,7 +98,6 @@ abstract class DnsBase
}
if (empty($domains)) {
$this->_logger->logAction(CRON_ACTION, LOG_INFO, 'No domains found for nameserver-config, skipping...');
return null;
}

View File

@@ -35,7 +35,11 @@ class bind extends DnsBase
$domains = $this->getDomainList();
if (! empty($domains)) {
if (empty($domains)) {
$this->_logger->logAction(CRON_ACTION, LOG_INFO, 'No domains found for nameserver-config, skipping...');
return;
}
$bindconf_file = '# ' . Settings::Get('system.bindconf_directory') . 'froxlor_bind.conf' . "\n" . '# Created ' . date('d.m.Y H:i') . "\n" . '# Do NOT manually edit this file, all changes will be deleted after the next domain change at the panel.' . "\n\n";
foreach ($domains as $domain) {
@@ -69,7 +73,6 @@ class bind extends DnsBase
safe_exec(escapeshellcmd(Settings::Get('system.bindreload_command')));
$this->_logger->logAction(CRON_ACTION, LOG_INFO, 'Bind9 reloaded');
}
}
private function _generateDomainConfig($domain = array())
{

View File

@@ -34,7 +34,11 @@ class pdns extends DnsBase
$domains = $this->getDomainList();
if (! empty($domains)) {
if (empty($domains)) {
$this->_logger->logAction(CRON_ACTION, LOG_INFO, 'No domains found for nameserver-config, skipping...');
return;
}
foreach ($domains as $domain) {
// check for system-hostname
@@ -59,7 +63,6 @@ class pdns extends DnsBase
safe_exec(escapeshellcmd(Settings::Get('system.bindreload_command')));
$this->_logger->logAction(CRON_ACTION, LOG_INFO, 'pdns reloaded');
}
}
private function _cleanZonefiles()
{