Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guilherme Filippo
ISPConfig 3
Commits
cafdec2a
Commit
cafdec2a
authored
Sep 16, 2010
by
tbrehm
Browse files
Fixed: FS#1287 - ispconfig.log rotated twice
parent
db377c64
Changes
2
Show whitespace changes
Inline
Side-by-side
install/lib/installer_base.lib.php
View file @
cafdec2a
...
...
@@ -1470,6 +1470,7 @@ class installer_base {
//* Add Log-Rotation
if
(
is_dir
(
'/etc/logrotate.d'
))
{
@
unlink
(
'/etc/logrotate.d/logispc3'
);
// ignore, if the file is not there
/* We rotate these logs in cron_daily.php
$fh = fopen('/etc/logrotate.d/logispc3', 'w');
fwrite($fh,
"/var/log/ispconfig/ispconfig.log { \n" .
...
...
@@ -1487,6 +1488,7 @@ class installer_base {
" delaycompress \n" .
"}");
fclose($fh);
*/
}
}
...
...
server/cron_daily.php
View file @
cafdec2a
...
...
@@ -234,6 +234,13 @@ if(is_file($logfile) && filesize($logfile) > 10000000) {
exec
(
"cat /dev/null >
$logfile
"
);
}
// rotate the cron.log when it exceeds a size of 10 MB
$logfile
=
'/var/log/ispconfig/cron.log'
;
if
(
is_file
(
$logfile
)
&&
filesize
(
$logfile
)
>
10000000
)
{
exec
(
"gzip -c
$logfile
>
$logfile
.1.gz"
);
exec
(
"cat /dev/null >
$logfile
"
);
}
#######################################################################################################
// Cleanup website tmp directories
#######################################################################################################
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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