Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Jonas
ISPConfig 3
Commits
7c05ac39
Commit
7c05ac39
authored
Jun 19, 2018
by
Till Brehm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed: #5062 log rotate ispconfig error.log.1.gz
parent
c9abb2d5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
server/lib/classes/cron.d/200-logfiles.inc.php
server/lib/classes/cron.d/200-logfiles.inc.php
+2
-2
No files found.
server/lib/classes/cron.d/200-logfiles.inc.php
View file @
7c05ac39
...
...
@@ -150,8 +150,8 @@ class cronjob_logfiles extends cronjob {
$error_logfile
=
escapeshellcmd
(
$rec
[
'document_root'
]
.
'/'
.
$log_folder
.
'/error.log'
);
// rename older files (move up by one)
$num
=
$log_retention
;
while
(
$num
>=
1
&&
is_file
(
$error_logfile
.
'.'
.
$num
.
'.gz'
)
)
{
rename
(
$error_logfile
.
'.'
.
$num
.
'.gz'
,
$error_logfile
.
'.'
.
(
$num
+
1
)
.
'.gz'
);
while
(
$num
>=
1
)
{
if
(
is_file
(
$error_logfile
.
'.'
.
$num
.
'.gz'
))
rename
(
$error_logfile
.
'.'
.
$num
.
'.gz'
,
$error_logfile
.
'.'
.
(
$num
+
1
)
.
'.gz'
);
$num
--
;
}
// compress current 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