| | |
| | | ####################################################################################################### |
| | | |
| | | // rotate the ispconfig.log when it exceeds a size of 10 MB |
| | | $logfile = '/var/log/ispconfig/ispconfig.log'; |
| | | $logfile = $conf['ispconfig_log_dir'].'/ispconfig.log'; |
| | | if(is_file($logfile) && filesize($logfile) > 10000000) { |
| | | exec("gzip -c $logfile > $logfile.1.gz"); |
| | | exec("cat /dev/null > $logfile"); |
| | | } |
| | | |
| | | // rotate the cron.log when it exceeds a size of 10 MB |
| | | $logfile = '/var/log/ispconfig/cron.log'; |
| | | $logfile = $conf['ispconfig_log_dir'].'/cron.log'; |
| | | if(is_file($logfile) && filesize($logfile) > 10000000) { |
| | | exec("gzip -c $logfile > $logfile.1.gz"); |
| | | exec("cat /dev/null > $logfile"); |