mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
Add install function delaration
This commit is contained in:
parent
05c348570d
commit
cb2b8dbf3c
2 changed files with 10 additions and 3 deletions
11
parse_args
11
parse_args
|
@ -564,7 +564,13 @@ action_map = {
|
|||
#############################
|
||||
'tools' : {
|
||||
'category_help' : _("Specific tools"),
|
||||
'actions' : {}
|
||||
'actions' : {
|
||||
### tools_install()
|
||||
'install' : {
|
||||
'action_help' : _("Install YunoHost LDAP initialization"),
|
||||
'connections' : ['ldap'],
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -642,7 +648,8 @@ def main(action_map):
|
|||
else:
|
||||
result = args.func(vars(args))
|
||||
except TypeError, error:
|
||||
print error
|
||||
if not __debug__ :
|
||||
traceback.print_exc()
|
||||
print(_("Not (yet) implemented function"))
|
||||
return 1
|
||||
except YunoHostError, error:
|
||||
|
|
|
@ -214,7 +214,7 @@ class YunoHostLDAP:
|
|||
|
||||
"""
|
||||
self.conn = ldap.initialize('ldap://localhost:389')
|
||||
self.base = 'dc=gavoty,dc=org'
|
||||
self.base = 'dc=yunohost,dc=org'
|
||||
self.pwd = getpass.getpass(colorize(_('LDAP Admin Password: '), 'yellow'))
|
||||
try:
|
||||
self.conn.simple_bind_s('cn=admin,' + self.base, self.pwd)
|
||||
|
|
Loading…
Add table
Reference in a new issue