Check if domain already exists before create it

This commit is contained in:
Kload 2013-06-09 14:37:32 +00:00
parent 33aa060768
commit 6f5eeca719

View file

@ -68,6 +68,8 @@ def domain_add(domains, web=False):
domains = [ domains ]
for domain in domains:
if domain in domain_list()['Domains']:
continue
ssl_dir = '/usr/share/yunohost/yunohost-config/ssl/yunoCA'
ssl_domain_path = '/etc/yunohost/certs/'+ domain
with open(ssl_dir +'/serial', 'r') as f: