Add new comment
Want to support HowtoForge? Become a subscriber!
|
Nice script. Tried it with my server, which uses the access log format of: 01202011-10:56:46-access.log
Which means the for loop should be rewritten like this (Note the diroectory names for each vhost differ to yours and the ls -F etc will produce names like /var/log/apache2/admin.example.info:443) for directory in `ls -F|grep \/|awk -F/ '{print $1}'`; do if [ -d ${directory} ]; then /usr/bin/webalizer -c ${webalizerconf} -n ${directory} -s ${directory} -r ${directory} -q -T -o /www/admin/webalizer/${directory}/web/stats ${logdir}/${directory}/${yesterdaysdate}-??:??:??-access.log; fi; done
??:??:?? is a valid shell expansion, but fails in the script because it does not expand it. I think this is a problem with Webanaliser.
Reply |



Recent comments
6 hours 8 min ago
9 hours 51 min ago
10 hours 1 min ago
10 hours 8 min ago
11 hours 52 min ago
15 hours 50 min ago
1 day 3 hours ago
2 days 12 hours ago
2 days 16 hours ago
2 days 17 hours ago