only pass logs in case of compressed logs or logrotate running

This commit is contained in:
Alex Phillips
2022-02-03 09:41:47 -05:00
parent b0840e2820
commit 51b52dd369
+1 -1
View File
@@ -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("<title>Server&nbsp;Statistics", "<title>SWAG&nbsp;Dashboard", $goaccess);
$goaccess = str_replace("<h1 class='h-dashboard'>", "<h1>", $goaccess);