From 89c1859cbc1885824ce88af3a101a2cf32a46982 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 26 Aug 2023 11:50:42 +0200 Subject: [PATCH] cleaning --- manifest.toml | 8 ++++---- scripts/install | 5 ----- scripts/remove | 5 ----- scripts/restore | 19 +++++++------------ scripts/upgrade | 7 +------ 5 files changed, 12 insertions(+), 32 deletions(-) diff --git a/manifest.toml b/manifest.toml index e429d80..eb1b9b9 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Prestashop" description.en = "Create a E-commerce Website" description.fr = "Créer un site ecommerce" -version = "8.0.4~ynh1" +version = "8.1.1~ynh1" maintainers = ["frju365"] @@ -43,8 +43,8 @@ ram.runtime = "50M" [resources] [resources.sources.main] - url = "https://github.com/PrestaShop/PrestaShop/releases/download/8.0.4/prestashop_8.0.4.zip" - sha256 = "a4603059d1b581d50a501eb70bd7a3557d13ea1edc43292ec96deae6b14b28f5" + url = "https://github.com/PrestaShop/PrestaShop/releases/download/8.1.1/prestashop_8.1.1.zip" + sha256 = "67de3b68e754c68bbd967ad0a4175c6ad091847bd6fc61e926be0fe2edf7f022" in_subdir = false autoupdate.strategy = "latest_github_tag" @@ -56,7 +56,7 @@ ram.runtime = "50M" main.url = "/" [resources.apt] - packages = "mariadb-server php8.2-mbstring php8.2-fpm php8.2-common php8.2-curl php8.2-intl php8.2-xmlrpc php8.2-mysql php8.2-gd php8.2-xml php8.2-cli php8.2-zip" + packages = "mariadb-server php8.2-mbstring php8.2-curl php8.2-intl php8.2-xmlrpc php8.2-mysql php8.2-gd php8.2-xml php8.2-cli php8.2-zip" [resources.database] type = "mysql" diff --git a/scripts/install b/scripts/install index 7c4646b..ae5b49f 100644 --- a/scripts/install +++ b/scripts/install @@ -44,11 +44,6 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=1 # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# PHP-FPM CONFIGURATION -#================================================= -ynh_script_progression --message="Configuring PHP-FPM..." --weight=3 - # Create a dedicated PHP-FPM config ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint diff --git a/scripts/remove b/scripts/remove index 79cb058..61db822 100644 --- a/scripts/remove +++ b/scripts/remove @@ -17,11 +17,6 @@ ynh_script_progression --message="Removing NGINX web server configuration..." -- # Remove the dedicated NGINX config ynh_remove_nginx_config -#================================================= -# REMOVE PHP-FPM CONFIGURATION -#================================================= -ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=1 - # Remove the dedicated PHP-FPM config ynh_remove_fpm_config diff --git a/scripts/restore b/scripts/restore index 4c7c876..57dfea9 100644 --- a/scripts/restore +++ b/scripts/restore @@ -19,6 +19,13 @@ ynh_restore_file --origin_path="$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" +#================================================= +# RESTORE THE MYSQL DATABASE +#================================================= +ynh_script_progression --message="Restoring the MySQL database..." --weight=1 + +ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql + #================================================= # RESTORE THE PHP-FPM CONFIGURATION #================================================= @@ -26,20 +33,8 @@ ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weig ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" -#================================================= -# RESTORE THE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the NGINX configuration..." --weight=1 - ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# RESTORE THE MYSQL DATABASE -#================================================= -ynh_script_progression --message="Restoring the MySQL database..." --weight=1 - -ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql - #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index d09da26..fba5743 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -59,12 +59,7 @@ chown -R $app:www-data "$install_dir" ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint - -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1 +ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint # Create a dedicated NGINX config ynh_add_nginx_config