Skip to content

Commit 5bf6657

Browse files
author
Till Brehm
committed
Merge branch 'cron-logs-rotation-fix' into 'stable-3.1'
Fixed cron logs rotation See merge request ispconfig/ispconfig3!1102
2 parents b9ae9dc + 33b359d commit 5bf6657

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/lib/classes/cron.d/200-logfiles.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public function onRunJob() {
124124

125125
$cron_logfiles = array('cron.log', 'cron_error.log', 'cron_wget.log');
126126
foreach($cron_logfiles as $cron_logfile) {
127-
$cron_logfile = $rec['document_root'].'/' . $log_folder . '/' . $cron_logfile;
127+
$cron_logfile = $rec['document_root'].'/private/' . $cron_logfile;
128128

129129
// rename older files (move up by one)
130130
$num = $log_retention;
@@ -193,7 +193,7 @@ public function onRunJob() {
193193
if(is_file($ispconfig_logfile . '.' . $num . '.gz')) rename($ispconfig_logfile . '.' . $num . '.gz', $ispconfig_logfile . '.' . ($num + 1) . '.gz');
194194
$num--;
195195
}
196-
// compress current logfile
196+
//* compress current logfile
197197
if(is_file($ispconfig_logfile)) {
198198
$app->system->exec_safe("gzip -c ? > ?", $ispconfig_logfile, $ispconfig_logfile . '.1.gz');
199199
$app->system->exec_safe("cat /dev/null > ?", $ispconfig_logfile);

0 commit comments

Comments
 (0)