From 05d51fb948b611c92729fa4e8bc3e5cae37ebe06 Mon Sep 17 00:00:00 2001 From: Krakinou Date: Wed, 30 Jan 2019 22:39:40 +0100 Subject: [PATCH] Give access to app prior to update --- scripts/upgrade | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index a5f4ee1..e77ea9d 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -85,18 +85,23 @@ pip install --target $final_path/vendor -r $final_path/requirements.txt # Create a dedicated user (if not existing) ynh_system_user_create $app +# Set permissions on app files (required to be able to update database) +chown -R $app: $final_path #================================================= # SPECIFIC UPGRADE #================================================= -# ... +#build multimedia directory #================================================= -#build multimedia directory #Create multimedia directory but we do not change the calibre_dir : It's the user to make this choice. ynh_multimedia_build_main_dir ynh_multimedia_addaccess $app +#================================================= +#Update database structure +#================================================= + ### Verify the checksum of a file, stored by `ynh_store_file_checksum` in the install script. ### And create a backup of this file if the checksum is different. So the file will be backed up if the admin had modified it. ynh_backup_if_checksum_is_different "$final_path/app.db"