mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 16:14:40 +00:00
system: remove vmcore files earlier
This commit is contained in:
parent
c9944b647c
commit
0a74256241
@ -143,6 +143,13 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
}
|
||||
}
|
||||
if ($count || (!empty($desc) && !empty($email))) {
|
||||
$files_to_upload = glob('/var/crash/*');
|
||||
foreach ($files_to_upload as $key => $file) {
|
||||
if (filesize($file) > 450000) {
|
||||
unset($files_to_upload[$key]);
|
||||
@unlink($file);
|
||||
}
|
||||
}
|
||||
file_put_contents('/var/crash/crashreport_header.txt', $crash_report_header);
|
||||
if (file_exists('/tmp/PHP_errors.log')) {
|
||||
// limit PHP_errors to send to 1MB
|
||||
@ -152,11 +159,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
@copy('/var/run/dmesg.boot', '/var/crash/dmesg.boot');
|
||||
exec('/usr/bin/gzip /var/crash/*');
|
||||
$files_to_upload = glob('/var/crash/*');
|
||||
foreach ($files_to_upload as $key => $file) {
|
||||
if (filesize($file) > 450000) {
|
||||
unset($files_to_upload[$key]);
|
||||
}
|
||||
}
|
||||
upload_crash_report($files_to_upload, $user_agent);
|
||||
foreach ($files_to_upload as $file_to_upload) {
|
||||
@unlink($file_to_upload);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user