From 51b52dd36999266ce131cb4934eae55a904534ec Mon Sep 17 00:00:00 2001 From: Alex Phillips Date: Thu, 3 Feb 2022 09:41:47 -0500 Subject: [PATCH] only pass logs in case of compressed logs or logrotate running --- root/dashboard/www/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/root/dashboard/www/index.php b/root/dashboard/www/index.php index c3b4b40..d596cb4 100644 --- a/root/dashboard/www/index.php +++ b/root/dashboard/www/index.php @@ -252,7 +252,7 @@ $geodb = ''; endif; - $access_log = file_exists("/dashboard/logs") ? "/dashboard/logs/*" : "/config/log/nginx/access.log"; + $access_log = file_exists("/dashboard/logs") ? "/dashboard/logs/*.log" : "/config/log/nginx/access.log"; $goaccess = shell_exec("cat $access_log | /usr/local/bin/goaccess -a -o html --config-file=/dashboard/goaccess.conf $geodb -"); $goaccess = str_replace("Server Statistics", "<title>SWAG Dashboard", $goaccess); $goaccess = str_replace("<h1 class='h-dashboard'>", "<h1>", $goaccess);