diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/ldap2apache | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/bin/ldap2apache b/bin/ldap2apache index b7e82ba..85f747f 100755 --- a/bin/ldap2apache +++ b/bin/ldap2apache @@ -66,11 +66,21 @@ clients.each{ |c| server_admin = vhost['tnWebVHostWebmaster'][0] server_aliases = (vhost['tnWebVHostServerAlias'] or []).join(" ") home = client_home +"/"+ vhost['tnWebVHostHomeDirectory'][0] - property = {} + property = { # list multi-value keys here + 'phpiniaddon' => [] + } if vhost['tnWebVHostProperties'] vhost['tnWebVHostProperties'].each{ |prop| (key, val) = prop.split('=', 2) - property[key] = val + if property.has_key? key + if property[key].kind_of?(Array) + property[key] << val + else + throw "Found tnWebVHostProperties entry '#{prop}' but #{key} is already #{property[key]}" + end + else + property[key] = val + end } end property['php'] = "no" unless %w(yes no cgi5).include?property['php'] |