From a2969d34a27885bbc769b923ef993bd5419b2173 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 3 Apr 2022 10:55:08 +0200 Subject: [PATCH] Fix --- scripts/install | 1 + scripts/restore | 6 +++++- scripts/upgrade | 5 ++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 1eee328..7e90198 100644 --- a/scripts/install +++ b/scripts/install @@ -110,6 +110,7 @@ ynh_script_progression --message="Configuring PHP-FPM..." # Create a dedicated PHP-FPM config ynh_add_fpm_config +phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # SPECIFIC SETUP diff --git a/scripts/restore b/scripts/restore index 6e3b5b4..ad45e6e 100644 --- a/scripts/restore +++ b/scripts/restore @@ -56,6 +56,7 @@ ynh_install_app_dependencies $pkg_dependencies #================================================= # RESTORE THE NGINX CONFIGURATION #================================================= +ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1 ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" @@ -74,6 +75,10 @@ ynh_script_progression --message="Restoring Baïkal main directory..." ynh_restore_file --origin_path="$final_path" +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" + #================================================= # RESTORE THE MYSQL DATABASE #================================================= @@ -88,7 +93,6 @@ ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./ #================================================= # Set permissions -chown -R root: "$final_path" chown $app "$final_path/config/baikal.yaml" chmod 640 "$final_path/config/baikal.yaml" diff --git a/scripts/upgrade b/scripts/upgrade index c187f83..4f35451 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -108,6 +108,10 @@ then #ynh_secure_remove --file="$temp_folder" fi +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" + #================================================= # NGINX CONFIGURATION #================================================= @@ -184,7 +188,6 @@ fi #================================================= # Set permissions -chown -R root: "$final_path" chown $app "$final_path/config/baikal.yaml" chmod 640 "$final_path/config/baikal.yaml"