From a79d03f17c11849558b95f9c3586124b8f00465b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 7 Sep 2023 22:50:02 +0200 Subject: [PATCH] cleaning --- manifest.toml | 4 ++-- scripts/install | 5 ----- scripts/remove | 12 ------------ scripts/restore | 22 ++++++---------------- scripts/upgrade | 5 ----- 5 files changed, 8 insertions(+), 40 deletions(-) diff --git a/manifest.toml b/manifest.toml index 178000c..07272fa 100644 --- a/manifest.toml +++ b/manifest.toml @@ -17,7 +17,7 @@ admindoc = "https://docs.humhub.org" code = "https://github.com/humhub/humhub" [integration] -yunohost = ">= 11.1.18" +yunohost = ">= 11.2" architectures = "all" multi_instance = true ldap = true @@ -54,7 +54,7 @@ ram.runtime = "50M" main.url = "/" [resources.apt] - packages = "mariadb-server php8.0-imagick php8.0-curl php8.0-bz2 php8.0-gd php8.0-intl php8.0-mysql php8.0-zip php8.0-apcu php8.0-xml php8.0-ldap" + packages = "mariadb-server, php8.0-imagick, php8.0-curl, php8.0-bz2, php8.0-gd, php8.0-intl, php8.0-mysql, php8.0-zip, php8.0-apcu, php8.0-xml, php8.0-ldap" [resources.database] type = "mysql" diff --git a/scripts/install b/scripts/install index d4c5d1b..d12b2b1 100644 --- a/scripts/install +++ b/scripts/install @@ -41,11 +41,6 @@ ynh_script_progression --message="Configuring PHP-FPM..." --weight=1 # Create a dedicated PHP-FPM config ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Configuring NGINX web server..." --weight=4 - # Create a dedicated NGINX config ynh_add_nginx_config diff --git a/scripts/remove b/scripts/remove index 4a6d587..fca489d 100644 --- a/scripts/remove +++ b/scripts/remove @@ -17,21 +17,9 @@ 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 -#================================================= -# SPECIFIC REMOVE -#================================================= -# REMOVE VARIOUS FILES -#================================================= -ynh_script_progression --message="Removing various files..." --weight=2 - # Remove a cron file ynh_secure_remove --file="/etc/cron.d/$app" diff --git a/scripts/restore b/scripts/restore index 103889e..b5f296c 100644 --- a/scripts/restore +++ b/scripts/restore @@ -21,20 +21,6 @@ chmod 750 "$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" -#================================================= -# RESTORE THE PHP-FPM CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weight=5 - -ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" - -#================================================= -# 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" - #================================================= # RESTORE THE MYSQL DATABASE #================================================= @@ -43,9 +29,13 @@ ynh_script_progression --message="Restoring the MySQL database..." --weight=2 ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql #================================================= -# RESTORE VARIOUS FILES +# RESTORE THE PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Restoring various files..." --weight=1 +ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weight=5 + +ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" + +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_restore_file --origin_path="/etc/cron.d/$app" diff --git a/scripts/upgrade b/scripts/upgrade index ad68709..324cad9 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -76,11 +76,6 @@ 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 - # Create a dedicated NGINX config ynh_add_nginx_config