mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
add LDAP conf at domain creation
This commit is contained in:
parent
2e551f40a7
commit
5b8226dcac
1 changed files with 9 additions and 0 deletions
|
@ -172,6 +172,15 @@ def domain_add(domains, web=False, main=False):
|
||||||
conf_lines = [
|
conf_lines = [
|
||||||
'VirtualHost "'+ domain +'"',
|
'VirtualHost "'+ domain +'"',
|
||||||
' authentication = "ldap2"',
|
' authentication = "ldap2"',
|
||||||
|
' ldap = {',
|
||||||
|
' hostname = "localhost",',
|
||||||
|
' user = {',
|
||||||
|
' basedn = "ou=users,dc=yunohost,dc=org",',
|
||||||
|
' filter = "(&(objectClass=posixAccount)(mail=*@'+ domain +'))",',
|
||||||
|
' usernamefield = "mail",',
|
||||||
|
' namefield = "cn",',
|
||||||
|
' },',
|
||||||
|
' }',
|
||||||
]
|
]
|
||||||
with open('/etc/metronome/conf.d/' + domain + '.cfg.lua', 'w') as conf:
|
with open('/etc/metronome/conf.d/' + domain + '.cfg.lua', 'w') as conf:
|
||||||
for line in conf_lines:
|
for line in conf_lines:
|
||||||
|
|
Loading…
Add table
Reference in a new issue