pass in log file to php exec

This commit is contained in:
Alex Phillips 2022-02-03 09:17:39 -05:00
parent 717c8258f3
commit 52aaaa7741

View File

@ -253,7 +253,7 @@
endif;
$access_log = getenv("GOACCESS_LOG_FILE") ?: "/config/log/nginx/access.log";
$goaccess = shell_exec("/usr/local/bin/goaccess -a -o html --config-file=/dashboard/goaccess.conf ".$geodb);
$goaccess = shell_exec("/usr/local/bin/goaccess -a -o html -f $access_log --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);
$goaccess = str_replace("<i class='fa fa-tachometer'></i>", "<img src='/icon.svg' width='32' height='32'>&nbsp;SWAG&nbsp;", $goaccess);