Fix Stats
This commit is contained in:
@@ -161,7 +161,7 @@ if ($action === 'admin_generate_stats') {
|
||||
$report = __DIR__ . "/stats.html";
|
||||
|
||||
// Récupérer tous les logs gzip
|
||||
$gz_files = glob('/var/log/nginx/materiel.org-access.log*.gz');
|
||||
$gz_files = glob('/var/log/nginx/materiel.kabano.org-access.log*.gz');
|
||||
|
||||
// Construire la commande
|
||||
$cmd = "/bin/bash -c '(";
|
||||
@@ -172,12 +172,12 @@ if ($action === 'admin_generate_stats') {
|
||||
}
|
||||
|
||||
// 2. Log d’hier
|
||||
if (file_exists('/var/log/nginx/materiel.org-access.log.1')) {
|
||||
$cmd .= "cat /var/log/nginx/materiel.org-access.log.1 ; ";
|
||||
if (file_exists('/var/log/nginx/materiel.kabano.org-access.log.1')) {
|
||||
$cmd .= "cat /var/log/nginx/materiel.kabano.org-access.log.1 ; ";
|
||||
}
|
||||
|
||||
// 3. Log du jour
|
||||
$cmd .= "cat /var/log/nginx/materiel.org-access.log";
|
||||
$cmd .= "cat /var/log/nginx/materiel.kabano.org-access.log";
|
||||
|
||||
$cmd .= ") | goaccess --log-format=COMBINED --no-progress -o "
|
||||
. escapeshellarg($report)
|
||||
|
||||
Reference in New Issue
Block a user