summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2006-10-18 14:50:09 +0000
committerweasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede>2006-10-18 14:50:09 +0000
commitc7437b7a31cb238fc46e42933a5ac246f270f8f2 (patch)
treea58548c245a856287a47eddfece9de86d3050778 /bin
parent61af6c5e5d40e5378bf9106cc18e7602e3cfe4b5 (diff)
Make stats optional
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@217 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ldap2apache42
1 files changed, 22 insertions, 20 deletions
diff --git a/bin/ldap2apache b/bin/ldap2apache
index 09bb71a..c1627c9 100755
--- a/bin/ldap2apache
+++ b/bin/ldap2apache
@@ -220,27 +220,29 @@ clients.each{ |c|
#config << " ScriptAlias /cgi-stats/awstats.pl /usr/lib/cgi-bin/awstats.pl"
#config << " Redirect permanent " + @webstat_location + " http://"+server_name+"/cgi-stats/awstats.pl"
- config = []
- config << "<VirtualHost #{bind}:#{bindhttpport}>"
- config << " ServerName stats.#{server_name}"
- config << " ServerAdmin #{server_admin}"
- config << " UserDir disabled"
- config << " ErrorLog #{client_home}/logs/stats.#{server_name}-error.log"
- config << " LogLevel warn"
- config << " CustomLog #{client_home}/logs/stats.#{server_name}-access.log combined"
- config << " ServerSignature On"
- config << ""
- config << ' Alias /awstats-classes/ "/usr/share/awstats/classes/"'
- config << ' Alias /awstats-css/ "/usr/share/awstats/css/"'
- config << ' Alias /awstats-icon/ "/usr/share/awstats/icon/"'
- config << " ScriptAlias /cgi-stats/awstats.pl /usr/lib/cgi-bin/awstats.pl"
- config << " Redirect permanent / http://stats.#{server_name}/cgi-stats/awstats.pl"
- config << "</VirtualHost>"
- config << '# vim:ft=apache:'
+ unless property['stats'] == "no"
+ config = []
+ config << "<VirtualHost #{bind}:#{bindhttpport}>"
+ config << " ServerName stats.#{server_name}"
+ config << " ServerAdmin #{server_admin}"
+ config << " UserDir disabled"
+ config << " ErrorLog #{client_home}/logs/stats.#{server_name}-error.log"
+ config << " LogLevel warn"
+ config << " CustomLog #{client_home}/logs/stats.#{server_name}-access.log combined"
+ config << " ServerSignature On"
+ config << ""
+ config << ' Alias /awstats-classes/ "/usr/share/awstats/classes/"'
+ config << ' Alias /awstats-css/ "/usr/share/awstats/css/"'
+ config << ' Alias /awstats-icon/ "/usr/share/awstats/icon/"'
+ config << " ScriptAlias /cgi-stats/awstats.pl /usr/lib/cgi-bin/awstats.pl"
+ config << " Redirect permanent / http://stats.#{server_name}/cgi-stats/awstats.pl"
+ config << "</VirtualHost>"
+ config << '# vim:ft=apache:'
- sn2 = server_name +'-stats'
- throw "Clash on #{sn2} of client#{c['o'][0]}" if files[ c['o'][0] +"-"+ sn2 ]
- files[ c['o'][0] +"-"+ sn2 ] = config
+ sn2 = server_name +'-stats'
+ throw "Clash on #{sn2} of client#{c['o'][0]}" if files[ c['o'][0] +"-"+ sn2 ]
+ files[ c['o'][0] +"-"+ sn2 ] = config
+ end
}
}