mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
Check if domain already exists before create it
This commit is contained in:
parent
33aa060768
commit
6f5eeca719
1 changed files with 2 additions and 0 deletions
|
@ -68,6 +68,8 @@ def domain_add(domains, web=False):
|
||||||
domains = [ domains ]
|
domains = [ domains ]
|
||||||
|
|
||||||
for domain in domains:
|
for domain in domains:
|
||||||
|
if domain in domain_list()['Domains']:
|
||||||
|
continue
|
||||||
ssl_dir = '/usr/share/yunohost/yunohost-config/ssl/yunoCA'
|
ssl_dir = '/usr/share/yunohost/yunohost-config/ssl/yunoCA'
|
||||||
ssl_domain_path = '/etc/yunohost/certs/'+ domain
|
ssl_domain_path = '/etc/yunohost/certs/'+ domain
|
||||||
with open(ssl_dir +'/serial', 'r') as f:
|
with open(ssl_dir +'/serial', 'r') as f:
|
||||||
|
|
Loading…
Reference in a new issue