tbrehm
2013-01-31 d92b2ec01b5cadaa70f72b0993e8277d4e952256
Fixed: FS#2623 - Apache Logs of primary server host is not being rotated
1 files modified
7 ■■■■■ changed files
server/cron_daily.php 7 ●●●●● patch | view | raw | blame | history
server/cron_daily.php
@@ -495,6 +495,13 @@
    exec('rm -f '.$logfile);
}
//* Delete old logfiles in /var/log/ispconfig/httpd/ that were created by vlogger for the hostname of the server
exec('hostname -f', $tmp_hostname);
if($tmp_hostname[0] != '' && is_dir('/var/log/ispconfig/httpd/'.$tmp_hostname[0])) {
    exec('cd /var/log/ispconfig/httpd/'.$tmp_hostname[0]."; find . -mtime +30 -name '*.log' | xargs rm > /dev/null 2> /dev/null");
}
unset($tmp_hostname);
#######################################################################################################
// Rotate the ispconfig.log file
#######################################################################################################