Commit 5ef60a7f authored by tbrehm's avatar tbrehm
Browse files

Fixed: FS#1456 - Web domain's log rotate problem

parent f2169ac8
...@@ -280,6 +280,15 @@ foreach($records as $rec) { ...@@ -280,6 +280,15 @@ foreach($records as $rec) {
if(@is_file($logfile)) { if(@is_file($logfile)) {
unlink($logfile); unlink($logfile);
} }
//* Delete older Log files, in case that we missed them before due to serverdowntimes.
$datepart = date('Ym',time() - 86400 * 31 * 2);
$logfile = escapeshellcmd($rec['document_root']).'/log/'.$datepart.'*-access.log.gz';
exec('rm -f '.$logfile);
$logfile = escapeshellcmd($rec['document_root']).'/log/'.$datepart.'*-access.log';
exec('rm -f '.$logfile);
} }
####################################################################################################### #######################################################################################################
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment