Merge pull request #427 from YunoHost/enh_conf_folder_for_change-url

Add access to conf folder when executing change_url script
This commit is contained in:
Laurent Peuch 2018-02-07 21:58:02 +01:00 committed by GitHub
commit a2ab9c6cac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -485,6 +485,12 @@ def app_change_url(auth, app, domain, path):
shutil.copytree(os.path.join(APPS_SETTING_PATH, app, "scripts"),
os.path.join(APP_TMP_FOLDER, "scripts"))
if os.path.exists(os.path.join(APP_TMP_FOLDER, "conf")):
shutil.rmtree(os.path.join(APP_TMP_FOLDER, "conf"))
shutil.copytree(os.path.join(APPS_SETTING_PATH, app, "conf"),
os.path.join(APP_TMP_FOLDER, "conf"))
# Execute App change_url script
os.system('chown -R admin: %s' % INSTALL_TMP)
os.system('chmod +x %s' % os.path.join(os.path.join(APP_TMP_FOLDER, "scripts")))