mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
bugfix
This commit is contained in:
parent
c0e34e960a
commit
14c3fb84ff
1 changed files with 10 additions and 10 deletions
|
@ -230,16 +230,6 @@ def tools_postinstall(domain, password, dyndns=False):
|
||||||
password -- YunoHost admin password
|
password -- YunoHost admin password
|
||||||
|
|
||||||
"""
|
"""
|
||||||
if len(domain.split('.')) >= 3:
|
|
||||||
r = requests.get('http://dyndns.yunohost.org/domains')
|
|
||||||
dyndomains = json.loads(r.text)
|
|
||||||
dyndomain = '.'.join(new_domain.split('.')[1:])
|
|
||||||
if dyndomain in dyndomains:
|
|
||||||
if requests.get('http://dyndns.yunohost.org/test/'+ domain).status_code == 200:
|
|
||||||
dyndns=True
|
|
||||||
else:
|
|
||||||
raise YunoHostError(17, _("Domain is already taken"))
|
|
||||||
|
|
||||||
with YunoHostLDAP(password='yunohost') as yldap:
|
with YunoHostLDAP(password='yunohost') as yldap:
|
||||||
try:
|
try:
|
||||||
with open('/etc/yunohost/installed') as f: pass
|
with open('/etc/yunohost/installed') as f: pass
|
||||||
|
@ -248,6 +238,16 @@ def tools_postinstall(domain, password, dyndns=False):
|
||||||
else:
|
else:
|
||||||
raise YunoHostError(17, _("YunoHost is already installed"))
|
raise YunoHostError(17, _("YunoHost is already installed"))
|
||||||
|
|
||||||
|
if len(domain.split('.')) >= 3:
|
||||||
|
r = requests.get('http://dyndns.yunohost.org/domains')
|
||||||
|
dyndomains = json.loads(r.text)
|
||||||
|
dyndomain = '.'.join(domain.split('.')[1:])
|
||||||
|
if dyndomain in dyndomains:
|
||||||
|
if requests.get('http://dyndns.yunohost.org/test/'+ domain).status_code == 200:
|
||||||
|
dyndns=True
|
||||||
|
else:
|
||||||
|
raise YunoHostError(17, _("Domain is already taken"))
|
||||||
|
|
||||||
# Create required folders
|
# Create required folders
|
||||||
folders_to_create = [
|
folders_to_create = [
|
||||||
'/etc/yunohost/apps',
|
'/etc/yunohost/apps',
|
||||||
|
|
Loading…
Reference in a new issue