Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
ISPConfig
ISPConfig 3
Commits
5ef60a7f
Commit
5ef60a7f
authored
Sep 08, 2011
by
tbrehm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed: FS#1456 - Web domain's log rotate problem
parent
f2169ac8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
server/cron_daily.php
server/cron_daily.php
+9
-0
No files found.
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