18 lines
369 B
Bash
18 lines
369 B
Bash
|
# NanoBlogger Total Vists Plugin
|
||
|
# gets hits on /blog from apache access logs
|
||
|
#
|
||
|
# sample code for templates - based on default stylesheet
|
||
|
#
|
||
|
# <div class="side">
|
||
|
# Total visits (last year): $TOTAL_VISITS
|
||
|
# </div>
|
||
|
|
||
|
nb_msg "generating last visits ..."
|
||
|
|
||
|
TOTAL_VISITS=0
|
||
|
|
||
|
for log in $ACCESS_LOG; do
|
||
|
TOTAL_VISITS=$(($TOTAL_VISITS + $(zgrep -c -h "GET /blog/ " $log)))
|
||
|
done
|
||
|
|