From c7a6aa61a55cb1ed47459d6dbfff4a207a7fb0f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 24 Nov 2023 17:19:19 +0100 Subject: [PATCH] cleaning --- manifest.toml | 2 -- scripts/install | 7 +------ scripts/remove | 5 ----- scripts/restore | 21 ++++++++------------- scripts/upgrade | 7 +------ 5 files changed, 10 insertions(+), 32 deletions(-) diff --git a/manifest.toml b/manifest.toml index ce22eae..ce60ca6 100644 --- a/manifest.toml +++ b/manifest.toml @@ -41,8 +41,6 @@ ram.runtime = "50M" type = "user" [install.init_main_permission] - help.en = "Visibility of the forum" - help.fr = "La visibilité du forum" type = "group" default = "visitors" diff --git a/scripts/install b/scripts/install index 7626c6c..5a8b102 100755 --- a/scripts/install +++ b/scripts/install @@ -34,13 +34,8 @@ 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=1 - # Create a dedicated php-fpm config -ynh_add_fpm_config --usage=low --footprint=low +ynh_add_fpm_config #================================================= # SETUP APPLICATION WITH CURL diff --git a/scripts/remove b/scripts/remove index ae1ece0..8eda4df 100755 --- a/scripts/remove +++ b/scripts/remove @@ -17,11 +17,6 @@ ynh_script_progression --message="Removing NGINX web server configuration" --wei # 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 839bfc4..4d19fc1 100755 --- a/scripts/restore +++ b/scripts/restore @@ -10,13 +10,6 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# 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 APP MAIN DIR #================================================= @@ -27,6 +20,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 #================================================= @@ -34,12 +34,7 @@ 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 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 +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index 4f9755d..30e685c 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -38,13 +38,8 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# PHP-FPM CONFIGURATION -#================================================= -ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1 - # Create a dedicated PHP-FPM config -ynh_add_fpm_config --usage=low --footprint=low +ynh_add_fpm_config #================================================= # GENERIC FINALIZATION