From 371c9b47baa59cba5fa01768298b0435b60fc869 Mon Sep 17 00:00:00 2001 From: Stylix58 <63605602+Stylix58@users.noreply.github.com> Date: Mon, 29 Mar 2021 19:00:07 +0200 Subject: [PATCH] Update restore --- scripts/restore | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/scripts/restore b/scripts/restore index da00f18..2b7f8a3 100755 --- a/scripts/restore +++ b/scripts/restore @@ -27,7 +27,7 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) +app_id=$(ynh_app_setting_get --app=$app --key=app_id) #================================================= # CHECK IF THE APP CAN BE RESTORED @@ -58,12 +58,7 @@ ynh_restore_file --origin_path="$final_path" # RESTORE USER RIGHTS #================================================= -if [[ $path_url =~ my_webapp ]] -then - chown -R my_webapp $final_path -else - chown -R www-data.www-data $final_path -fi +chown -R $app_id $final_path #================================================= # RESTORE THE LOGROTATE CONFIGURATION