This commit is contained in:
Kload 2013-02-28 18:42:44 +01:00
parent efdaebaa30
commit 798cee75e1
2 changed files with 3 additions and 5 deletions

View file

@ -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)

View file

@ -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)