mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
Bugfixes
This commit is contained in:
parent
654eb0d99a
commit
e6c1af70ee
2 changed files with 3 additions and 11 deletions
|
@ -31,8 +31,6 @@ import shutil
|
|||
from urllib import urlopen
|
||||
from yunohost import YunoHostError, YunoHostLDAP, win_msg, colorize, validate, get_required_args
|
||||
|
||||
a2_template_path = '/etc/yunohost/apache/templates'
|
||||
a2_app_conf_path = '/etc/yunohost/apache/domains'
|
||||
|
||||
def domain_list(filter=None, limit=None, offset=None):
|
||||
"""
|
||||
|
@ -66,13 +64,12 @@ def domain_list(filter=None, limit=None, offset=None):
|
|||
return { 'Domains': result_list }
|
||||
|
||||
|
||||
def domain_add(domains, raw=False, main=False):
|
||||
def domain_add(domains, main=False):
|
||||
"""
|
||||
Create a custom domain
|
||||
|
||||
Keyword argument:
|
||||
domains -- Domain name to add
|
||||
raw -- Do not configure Apache and LemonLDAP for the domain
|
||||
|
||||
"""
|
||||
with YunoHostLDAP() as yldap:
|
||||
|
@ -114,11 +111,6 @@ def domain_add(domains, raw=False, main=False):
|
|||
try:
|
||||
yldap.validate_uniqueness({ 'virtualdomain' : domain })
|
||||
except YunoHostError:
|
||||
if not raw:
|
||||
win_msg(_("Web config created"))
|
||||
result.append(domain)
|
||||
break
|
||||
else:
|
||||
raise YunoHostError(17, _("Domain already created"))
|
||||
|
||||
|
||||
|
|
|
@ -162,7 +162,7 @@ def tools_maindomain(old_domain, new_domain, dyndns=False):
|
|||
for line in lines:
|
||||
sources.write(re.sub(r''+ old_domain +'', new_domain, line))
|
||||
|
||||
domain_add([new_domain], raw=False, main=True)
|
||||
domain_add([new_domain], main=True)
|
||||
|
||||
# TODO: Generate SSOwat conf
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue