mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
fail
This commit is contained in:
parent
efdaebaa30
commit
798cee75e1
2 changed files with 3 additions and 5 deletions
|
@ -227,6 +227,8 @@ def app_install(app, domain, path='/', label=None, public=False, protected=True)
|
|||
for line in a2_conf_lines:
|
||||
file.write(line + '\n')
|
||||
|
||||
os.system('service apache2 reload')
|
||||
|
||||
|
||||
# TMP: Remove old settings
|
||||
if os.path.exists(app_setting_path): shutil.rmtree(app_setting_path)
|
||||
|
|
|
@ -184,14 +184,10 @@ def _apache_config(domain):
|
|||
domain -- Domain to configure Apache around
|
||||
|
||||
"""
|
||||
# TMP: remove old conf
|
||||
if os.path.exists(a2_app_conf_path +'/'+ domain +'.conf'): os.remove(a2_app_conf_path +'/'+ domain +'.conf')
|
||||
if os.path.exists(a2_app_conf_path +'/'+ domain +'.d/'): shutil.rmtree(a2_app_conf_path +'/'+ domain +'.d/')
|
||||
|
||||
try: os.listdir(a2_app_conf_path +'/'+ domain +'.d/')
|
||||
except OSError: os.makedirs(a2_app_conf_path +'/'+ domain +'.d/')
|
||||
|
||||
with open(a2_app_conf_path +'/'+ domain +'.conf', 'a') as a2_conf:
|
||||
with open(a2_app_conf_path +'/'+ domain +'.conf', 'w') as a2_conf:
|
||||
for line in open(a2_template_path +'/template.conf.tmp'):
|
||||
line = line.replace('[domain]',domain)
|
||||
a2_conf.write(line)
|
||||
|
|
Loading…
Add table
Reference in a new issue