From b9d8e09fee2538e76b93e86b2829dcd51c7df867 Mon Sep 17 00:00:00 2001 From: Jimmy Monin Date: Sat, 10 Aug 2019 19:28:43 +0200 Subject: [PATCH] Change also datadir's scope --- scripts/upgrade | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index f6bdc01..2e3f7ec 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -193,6 +193,8 @@ local mount_id=`exec_occ files_external:create --output=json \ && ynh_print_warn --message="Unable to create external storage" \ || exec_occ files_external:option "$mount_id" enable_sharing true } +# Define app's data directory +datadir="/home/yunohost.app/$app/data" if [ "$upgrade_type" == "UPGRADE_APP" ] then @@ -202,9 +204,6 @@ then source upgrade.d/upgrade.last.sh last_version=$next_version - # Define app's data directory - datadir="/home/yunohost.app/$app/data" - # Set write access for the following commands chown -R $app: "$final_path" "$datadir"