Welcome to the bugtracker of the ISPConfig project. This bugtracker is for ISPConfig 3.x only.
FS#621 - Error in log rotation
Attached to Project:
ISPConfig 3
Opened by Alexander Stehlik (astehlik) - Thursday, 12 March 2009, 18:48 GMT
Last edited by Till (Till) - Thursday, 12 March 2009, 21:15 GMT
Opened by Alexander Stehlik (astehlik) - Thursday, 12 March 2009, 18:48 GMT
Last edited by Till (Till) - Thursday, 12 March 2009, 21:15 GMT
|
DetailsIn the /usr/local/ispconfig/server/cron_daily.php is are 2 errors in the log rotation (as far as I understand).
First, the command to compress the log file creates a new compressed file, but doesn't delete the uncompressed one. As far as I can see it doesn't get deleted at all. So my first recommendation would be, to change line 117 from exec("gzip -c $logfile > $logfile.gz"); to exec("gzip $logfile.gz"); so that the uncompressed file disappears. Second, the compessed file will be deleted immediatly after it was created since there is a bug in line 122 that will delete the yesterdays log file instead of the one that is one month old. So you need to change $logfile = escapeshellcmd($rec["document_root"].'/log/'.$yesterday.'-access.log.gz'); to $logfile = escapeshellcmd($rec["document_root"].'/log/'.$month_ago.'-access.log.gz'); Kind regards, Alex. |
This task depends upon