Skip to content

Commit 8323932

Browse files
author
Marius Burkard
committed
Merge branch 'develop' into 'develop'
Develop Closes #5916 See merge request ispconfig/ispconfig3!1284
2 parents d5d0e98 + d376b4e commit 8323932

File tree

4 files changed

+20
-5
lines changed

4 files changed

+20
-5
lines changed

server/lib/classes/cron.d/100-monitor_letsencrypt_log.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function onRunJob() {
6565
$type = 'log_letsencrypt';
6666

6767
/* Get the data of the log */
68-
$data = $this->_tools->_getLogData($type);
68+
$data = $this->_tools->_getLogData($type, 500);
6969

7070
/*
7171
* actually this info has no state.

server/lib/classes/cron.d/100-monitor_mail_log.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function onRunJob() {
6767
$type = 'log_mail';
6868

6969
/* Get the data of the log */
70-
$data = $this->_tools->_getLogData($type);
70+
$data = $this->_tools->_getLogData($type, 500);
7171

7272
/*
7373
* actually this info has no state.

server/lib/classes/monitor_tools.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ public function monitorServices() {
488488
return $res;
489489
}
490490

491-
public function _getLogData($log) {
491+
public function _getLogData($log, $max_lines = 100) {
492492
global $conf;
493493

494494
$dist = '';
@@ -645,7 +645,7 @@ public function _getLogData($log) {
645645
} else {
646646
$log = '';
647647
if (is_readable($logfile)) {
648-
$fd = popen('tail -n 100 ' . escapeshellarg($logfile), 'r');
648+
$fd = popen('tail -n '.intval($max_lines).' ' . escapeshellarg($logfile), 'r');
649649
if ($fd) {
650650
while (!feof($fd)) {
651651
$log .= fgets($fd, 4096);

server/plugins-available/bind_plugin.inc.php

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,7 @@ function soa_update($event_name, $data) {
286286

287287
$records = $app->db->queryAllRecords("SELECT * FROM dns_rr WHERE zone = ? AND active = 'Y'", $zone['id']);
288288
if(is_array($records) && !empty($records)){
289+
$caa_add_rec = -1;
289290
for($i=0;$i<sizeof($records);$i++){
290291
if($records[$i]['ttl'] == 0) $records[$i]['ttl'] = '';
291292
if($records[$i]['name'] == '') $records[$i]['name'] = '@';
@@ -301,7 +302,21 @@ function soa_update($event_name, $data) {
301302
$records[$i]['data'] = implode(' ', $temp);
302303
$data_new = str_replace(array('"', ' '), '', $records[$i]['data']);
303304
$hex = unpack('H*', $data_new);
304-
$hex[1] = '0005'.strtoupper($hex[1]);
305+
if ($temp[1] == 'issuewild') {
306+
$hex[1] = '0009'.strtoupper($hex[1]);
307+
if ($caa_add_rec == -1) {
308+
// add issue ";" if only issuewild recordsa
309+
$caa_add_rec = array_push($records, $records[$i]);
310+
$records[$caa_add_rec-1]['data'] = "\# 8 000569737375653B";
311+
}
312+
} else {
313+
$hex[1] = '0005'.strtoupper($hex[1]);
314+
if ($caa_add_rec > 0) {
315+
// remove previously added issue ";"
316+
array_pop($records);
317+
}
318+
$caa_add_rec = -2;
319+
}
305320
$length = strlen($hex[1])/2;
306321
$data_new = "\# $length $hex[1]";
307322
$records[$i]['data'] = $data_new;

0 commit comments

Comments
 (0)