Update yunohost_app.py

chown only if not privileged or certified
This commit is contained in:
titoko 2013-07-19 10:18:20 +02:00
parent 1e0a66266b
commit 77e791c3be

View file

@ -332,7 +332,8 @@ def app_upgrade(app, instance=[], url=None, file=None):
os.system('cp -a "'+ app_tmp_folder +'" "'+ app_final_path +'"')
if is_web:
os.system('chown -R www-data: "'+ app_final_path +'"')
if app_type != 'privileged' and app_type != 'certified':
os.system('chown -R www-data: "'+ app_final_path +'"')
os.system('service apache2 reload')
shutil.rmtree(app_final_path + manifest['yunohost']['script_path'])
@ -543,7 +544,8 @@ def app_install(app, domain, path='/', label=None, mode='private'):
os.system('cp -a "'+ app_tmp_folder +'" "'+ app_final_path +'"')
if is_web:
os.system('chown -R www-data: "'+ app_final_path +'"')
if app_type != 'privileged' and app_type != 'certified':
os.system('chown -R www-data: "'+ app_final_path +'"')
os.system('service apache2 reload')
shutil.rmtree(app_final_path + manifest['yunohost']['script_path'])