From 43cd2b4440237ca04b0d6d963c2da71c9b23ab87 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 7 Jul 2021 10:07:16 +0200 Subject: [PATCH] Update restore --- scripts/restore | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index d7259f4..e7d488f 100644 --- a/scripts/restore +++ b/scripts/restore @@ -83,6 +83,19 @@ ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" ynh_add_fpm_config --package="$extra_php_dependencies" +#================================================= +# RESTORE THE DATA DIRECTORY +#================================================= +ynh_script_progression --message="Restoring the data directory..." --time --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" + # # Restore sources & data # src_path="/var/www/${app}" # cp -a ./sources "$src_path" @@ -90,7 +103,6 @@ ynh_add_fpm_config --package="$extra_php_dependencies" books_path=/home/$admin/calibre_library cp -a ./data "$books_path" - #================================================= # GENERIC FINALIZATION #=================================================