Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dirk Dankhoff
ISPConfig 3
Commits
5ef60a7f
Commit
5ef60a7f
authored
Sep 08, 2011
by
tbrehm
Browse files
Fixed: FS#1456 - Web domain's log rotate problem
parent
f2169ac8
Changes
1
Show whitespace changes
Inline
Side-by-side
server/cron_daily.php
View file @
5ef60a7f
...
...
@@ -280,6 +280,15 @@ foreach($records as $rec) {
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
);
}
#######################################################################################################
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment