diff --git a/yunohost_app.py b/yunohost_app.py index b769bfda..9dda8233 100644 --- a/yunohost_app.py +++ b/yunohost_app.py @@ -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) diff --git a/yunohost_domain.py b/yunohost_domain.py index df8c643b..9f4df983 100644 --- a/yunohost_domain.py +++ b/yunohost_domain.py @@ -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)