mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
Add main domain at post-install
This commit is contained in:
parent
f38f99f6a7
commit
075e32bfd4
1 changed files with 7 additions and 0 deletions
|
@ -30,6 +30,13 @@ def tools_ldapinit(args, connections):
|
|||
|
||||
for rdn, attr_dict in ldap_map['childs'].items():
|
||||
yldap.add(rdn, attr_dict)
|
||||
|
||||
validate({ args['domain'] : r'^([a-zA-Z0-9]{1}([a-zA-Z0-9\-]*[a-zA-Z0-9])*)(\.[a-zA-Z0-9]{1}([a-zA-Z0-9\-]*[a-zA-Z0-9])*)*(\.[a-zA-Z]{1}([a-zA-Z0-9\-]*[a-zA-Z0-9])*)$' })
|
||||
domain_dict = {
|
||||
'objectClass' : ['mailDomain', 'top'],
|
||||
'virtualdomain' : args['domain']
|
||||
}
|
||||
yldap.add('virtualdomain=' + args['domain'] + ',ou=domains', domain_dict)
|
||||
|
||||
admin_dict = {
|
||||
'cn': 'admin',
|
||||
|
|
Loading…
Reference in a new issue