diff options
-rwxr-xr-x | daily.sh | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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 \ |