tbrehm
2011-09-08 5ef60a7ff60d0b349e56b7681edc8679fe6cd1e0
Fixed: FS#1456 - Web domain's log rotate problem
1 files modified
9 ■■■■■ changed files
server/cron_daily.php 9 ●●●●● patch | view | raw | blame | history
server/cron_daily.php
@@ -280,6 +280,15 @@
    if(@is_file($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);
}
#######################################################################################################