some things

This commit is contained in:
Ben Harris 2018-04-05 14:48:18 -04:00
parent 1a32e216ea
commit a84d0175e6
3 changed files with 12 additions and 4 deletions

View File

@ -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

View File

@ -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.";

View File

@ -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">