From 66037fc2dd65779cb0f4c6cdcbeeb4d21b3dc692 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Wed, 18 Oct 2006 15:01:41 +0000 Subject: Make stats optional git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@223 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede --- bin/ldap2awstats | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/bin/ldap2awstats b/bin/ldap2awstats index 93f0ccb..130c402 100755 --- a/bin/ldap2awstats +++ b/bin/ldap2awstats @@ -39,6 +39,16 @@ clients.each{ |c| server_admin = vhost['tnWebVHostWebmaster'][0] server_aliases = (vhost['tnWebVHostServerAlias'] or []).join(" ") + property = {} + if vhost['tnWebVHostProperties'] + vhost['tnWebVHostProperties'].each{ |prop| + (key, val) = prop.split('=', 2) + property[key] = val + } + end + next if property['stats']='no' + + config = [] config << 'Include "/etc/awstats/awstats.conf"' config << 'LogFile="zcat '+client_home+'/logs-archive/'+server_name+'-access*gz |"' -- cgit v1.2.3