From 4b4ce4163e6bfab56f1b719dbdfa156b540fb4f9 Mon Sep 17 00:00:00 2001 From: jarod5001 <68397534+jarod5001@users.noreply.github.com> Date: Mon, 16 May 2022 21:28:53 +0100 Subject: [PATCH] Update restore --- scripts/restore | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/scripts/restore b/scripts/restore index ba115ec..1aad0d0 100755 --- a/scripts/restore +++ b/scripts/restore @@ -34,11 +34,8 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) # db_name=$(ynh_app_setting_get --app=$app --key=db_name) # db_user=$db_name phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) -# datadir=$(ynh_app_setting_get --app=$app --key=datadir) -is_public=$(ynh_app_setting_get --app=$app --key=is_public) -password=$(ynh_app_setting_get --app=$app --key=password) -admin=$(ynh_app_setting_get --app=$app --key=admin) -language=$(ynh_app_setting_get --app=$app --key=language) +datadir=$(ynh_app_setting_get --app=$app --key=datadir) + #================================================= # CHECK IF THE APP CAN BE RESTORED @@ -85,11 +82,11 @@ chown -R $app:www-data "$final_path" #================================================= # RESTORE THE DATA DIRECTORY #================================================= -# ynh_script_progression --message="Restoring the data directory..." --time --weight=1 +ynh_script_progression --message="Restoring the data directory..." --time --weight=1 -# ynh_restore_file --origin_path="$datadir" --not_mandatory +ynh_restore_file --origin_path="$datadir" --not_mandatory -# mkdir -p $datadir +mkdir -p $datadir # FIXME: this should be managed by the core in the future # Here, as a packager, you may have to tweak the ownerhsip/permissions @@ -97,9 +94,9 @@ chown -R $app:www-data "$final_path" # files in some cases. # But FOR THE LOVE OF GOD, do not allow r/x for "others" on the entire folder - # this will be treated as a security issue. -# chmod 750 "$datadir" -# chmod -R o-rwx "$datadir" -# chown -R $app:www-data "$datadir" +chmod 750 "$datadir" +chmod -R o-rwx "$datadir" +chown -R $app:www-data "$datadir" #================================================= @@ -157,9 +154,9 @@ ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" #================================================= # RESTORE THE LOGROTATE CONFIGURATION #================================================= -ynh_script_progression --message="Restoring the logrotate configuration..." --time --weight=1 +# ynh_script_progression --message="Restoring the logrotate configuration..." --time --weight=1 -ynh_restore_file --origin_path="/etc/logrotate.d/$app" +# ynh_restore_file --origin_path="/etc/logrotate.d/$app" #================================================= # INTEGRATE SERVICE IN YUNOHOST