From 947ca7126f1e3202955489d9b51e04a41b5c23d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 17 Jun 2021 23:15:52 +0200 Subject: [PATCH] Fix (#47) --- scripts/backup | 2 +- scripts/install | 2 +- scripts/restore | 6 +++--- scripts/upgrade | 10 +--------- 4 files changed, 6 insertions(+), 14 deletions(-) diff --git a/scripts/backup b/scripts/backup index 6afafdf..09f8c44 100644 --- a/scripts/backup +++ b/scripts/backup @@ -40,7 +40,7 @@ ynh_print_info --message="Declaring files to be backed up..." ynh_backup --src_path="$final_path" -ynh_backup --src_path="$data_path" +ynh_backup --src_path="$data_path" --is_big #================================================= # BACKUP THE NGINX CONFIGURATION diff --git a/scripts/install b/scripts/install index 973538d..325ba44 100644 --- a/scripts/install +++ b/scripts/install @@ -120,7 +120,7 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= mkdir -p $data_path -chown -R $app:www-data "$data_path" +chown -R $app:www-data $data_path #================================================= # SETUP APPLICATION diff --git a/scripts/restore b/scripts/restore index 2b70759..bdb931e 100644 --- a/scripts/restore +++ b/scripts/restore @@ -67,12 +67,12 @@ ynh_script_progression --message="Restoring Moodle main directory..." --weight=1 ynh_restore_file --origin_path=$final_path +ynh_restore_file --origin_path=$data_path --not_mandatory + +# Restore permissions on app files chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" - -ynh_restore_file --origin_path=$data_path - chown -R $app:www-data $data_path #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index b517364..8d561e4 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -137,15 +137,7 @@ ynh_script_progression --message="Adding cron job..." --weight=4 ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app" -#================================================= -# GENERIC FINALIZATION -#================================================= -# SECURE FILES AND DIRECTORIES -#================================================= -ynh_script_progression --message="Securing files and directories..." --weight=1 - -# Set permissions on app files -chown -R $app:www-data $data_path +chown -R $app:www-data "$final_path" #================================================= # RELOAD NGINX