mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
fixes
This commit is contained in:
parent
615d0202bd
commit
91ce44d6d0
1 changed files with 14 additions and 14 deletions
|
@ -163,24 +163,24 @@ def tools_postinstall(args, connections):
|
||||||
dict
|
dict
|
||||||
|
|
||||||
"""
|
"""
|
||||||
args = get_required_args(args, {'domain' : _('Main domain name'), 'password' : _('New admin password') }, True)
|
with get_required_args(args, {'domain' : _('Main domain name'), 'password' : _('New admin password') }, True) as args:
|
||||||
|
|
||||||
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(args, 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']})
|
||||||
|
|
||||||
# New domain config
|
# New domain config
|
||||||
tools_maindomain({ 'old' : 'yunohost.org', 'new' : args['domain']})
|
tools_maindomain({ 'old' : 'yunohost.org', 'new' : args['domain']})
|
||||||
|
|
||||||
os.system('touch /usr/share/yunohost/yunohost-config/others/installed')
|
os.system('touch /usr/share/yunohost/yunohost-config/others/installed')
|
||||||
|
|
||||||
return { 'Success' : _("YunoHost has been successfully configured") }
|
return { 'Success' : _("YunoHost has been successfully configured") }
|
||||||
|
|
Loading…
Add table
Reference in a new issue