This commit is contained in:
root 2012-10-25 19:52:26 +02:00
parent 3e0ee6f86e
commit 4e8ab23894

View file

@ -87,7 +87,7 @@ def tools_maindomain(args):
dict dict
""" """
args = get_required_args(args, {'new' : _('New main domain name')) args = get_required_args(args, {'new' : _('New main domain name')})
if not args['old']: if not args['old']:
with open('/usr/share/yunohost/yunohost-config/others/current_host', 'r') as f: with open('/usr/share/yunohost/yunohost-config/others/current_host', 'r') as f:
@ -165,12 +165,12 @@ def tools_postinstall(args, connections):
try: try:
with open('/usr/share/yunohost/yunohost-config/others/installed') as f: pass with open('/usr/share/yunohost/yunohost-config/others/installed') as f: pass
except IOError: except IOError:
print 'Installing YunoHost' print('Installing YunoHost')
else: else:
raise YunoHostError(17, _("YunoHost is already installed") raise YunoHostError(17, _("YunoHost is already installed"))
# Initialize YunoHost LDAP base # Initialize YunoHost LDAP base
tools_ldapinit(None, connections) tools_ldapinit(args, connections)
# Change LDAP admin password # Change LDAP admin password
tools_adminpw({ 'old' : 'yunohost', 'new' : args['password']}) tools_adminpw({ 'old' : 'yunohost', 'new' : args['password']})