some things
This commit is contained in:
parent
1a32e216ea
commit
a84d0175e6
|
@ -1,4 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
/bin/zcat /var/log/apache2/heyderebub.com_access.log.*.gz | /usr/local/bin/goaccess --log-format=COMBINED -f /var/log/apache2/heyderebub.com_access.log -f /var/log/apache2/heyderebub.com_access.log.1 -o /var/www/heyderebub.com/public_html/stats/stats.html
|
||||
LOG_DIR=/var/log/apache2/heyderebub.com_access
|
||||
|
||||
zcat $LOG_DIR.log.*.gz | goaccess --no-global-config --log-format=COMBINED -f $LOG_DIR.log -f $LOG_DIR.log.1 -o stats.html
|
||||
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
<?php
|
||||
if (time() - filemtime("stats.html") > 1 * 3600)
|
||||
exec("./analyze_hdb_logs");
|
||||
|
||||
echo file_get_contents("stats.html");
|
||||
if (!file_exists("stats.html") || time() - filemtime("stats.html") > 3600) {
|
||||
echo shell_exec("./analyze_hdb_logs 2>&1");
|
||||
}
|
||||
|
||||
if (file_exists("stats.html"))
|
||||
echo file_get_contents("stats.html");
|
||||
else
|
||||
echo "script didn't run. fix it.";
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
<link rel="manifest" href="/manifest.json">
|
||||
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
|
||||
<meta name="theme-color" content="#d9d9d9">
|
||||
<meta name="twitter:site" content="@heyderebub">
|
||||
|
||||
<!-- Bootstrap core CSS -->
|
||||
<link href="/themes/heyderebub/css/bootstrap.min.css" rel="stylesheet">
|
||||
|
|
Loading…
Reference in New Issue