Add new comment

Want to support HowtoForge? Become a subscriber!
Submitted by Anonymous (not registered) on Wed, 2011-08-31 09:52.

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.

Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.

Reply

*
*
The content of this field is kept private and will not be shown publicly.


*

  • Images can be added to this post.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <div>
  • Lines and paragraphs break automatically.