Skip to content

Commit

Permalink
Fix to only calc stats for active sites
Browse files Browse the repository at this point in the history
Old/moved sites may still have access.log files, so the update-awstats script
now filters the list to only include sites whose access.log was modified in the
last month.
  • Loading branch information
chuckhoupt committed Jan 5, 2019
1 parent 26b2c77 commit 28a3a73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion update-awstats
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ENDCONFIG
fi
}

for LOG in $HOME/logs/*/http{,s}/access.log
for LOG in $(find $HOME/logs/*/http{s,}/access.log -mtime -31)
do
[[ "$LOG" =~ logs/(.+)/(http|https) ]]
SITE=${BASH_REMATCH[1]}
Expand Down

0 comments on commit 28a3a73

Please sign in to comment.