From d954329432c8cc66249bf3299d0795585df81134 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 27 May 2022 16:47:20 +0200 Subject: [PATCH] Update restore --- scripts/restore | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/scripts/restore b/scripts/restore index 73b6a86..89c9a19 100644 --- a/scripts/restore +++ b/scripts/restore @@ -30,6 +30,7 @@ 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) port=$(ynh_app_setting_get --app=$app --key=port) +datadir=$(ynh_app_setting_get --app=$app --key=datadir) #================================================= # CHECK IF THE APP CAN BE RESTORED @@ -68,6 +69,19 @@ chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" chmod +x "$final_path/gossa" +#================================================= +# RESTORE THE DATA DIRECTORY +#================================================= +ynh_script_progression --message="Restoring the data directory..." --weight=1 + +ynh_restore_file --origin_path="$datadir" --not_mandatory + +mkdir -p $datadir + +chmod 750 "$datadir" +chmod -R o-rwx "$datadir" +chown -R $app:www-data "$datadir" + #================================================= # SPECIFIC RESTORATION #=================================================