summaryrefslogtreecommitdiff
path: root/daily.sh
diff options
context:
space:
mode:
Diffstat (limited to 'daily.sh')
-rwxr-xr-xdaily.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/daily.sh b/daily.sh
index 2d15006..db50bf7 100755
--- a/daily.sh
+++ b/daily.sh
@@ -17,9 +17,11 @@ AWMON=`/bin/date -d yesterday +%m`
# Run awstats
$SITEROOT/awstats/awstats -config="$DOMAIN" -update 2>&1 | /usr/bin/ts "$TSFMT awstats:" >>$LOGFILE
-# Remove any PII (e.g. IP addresses) from the awstats data
-#AWDATA="$SITEROOT/awstats/data/awstats${AWMON}${AWYEAR}.txt"
-#/bin/grep -E -v "^[[:digit:]]{1,3}\\.[[:digit:]]{1,3}\\.[[:digit:]]{1,3}\\.[[:digit:]]{1,3} [[:digit:]]" "$AWDATA" | /usr/bin/sponge "$AWDATA"
+# Remove any PII (i.e. IP addresses) from the awstats data
+AWDATA="$SITEROOT/awstats/data/awstats${AWMON}${AWYEAR}.txt"
+/bin/grep -E -v "^[[:digit:]]{1,3}\\.[[:digit:]]{1,3}\\.[[:digit:]]{1,3}\\.[[:digit:]]{1,3} [[:digit:]]" "$AWDATA" \
+ | /bin/sed -e "s/^BEGIN_VISITOR [[:digit:]]\\+\$/BEGIN_VISITOR 0/" \
+ | /usr/bin/sponge "$AWDATA"
#$SITEROOT/awstats/awstats_buildstaticpages.pl \
/usr/share/awstats/tools/awstats_buildstaticpages.pl \