From cf243d61b60f173942320b50ddf49bcdb2e6ccac Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 29 Apr 2023 09:49:00 +0200 Subject: [PATCH] fix --- scripts/install | 10 ---------- scripts/remove | 9 --------- scripts/restore | 22 ++++++---------------- scripts/upgrade | 5 ----- 4 files changed, 6 insertions(+), 40 deletions(-) diff --git a/scripts/install b/scripts/install index 5970920..ba0a0ba 100755 --- a/scripts/install +++ b/scripts/install @@ -51,19 +51,9 @@ 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=1 - # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# SETUP A CRON -#================================================= -ynh_script_progression --message="Setuping a cron..." - ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app" chmod 644 "/etc/cron.d/$app" diff --git a/scripts/remove b/scripts/remove index 8bb36a4..a18a484 100755 --- a/scripts/remove +++ b/scripts/remove @@ -17,18 +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=2 - # Remove the dedicated PHP-FPM config ynh_remove_fpm_config -#================================================= -# REMOVE VARIOUS FILES -#================================================= - # Remove a cron file ynh_secure_remove --file="/etc/cron.d/$app" diff --git a/scripts/restore b/scripts/restore index 15673db..da7640f 100755 --- a/scripts/restore +++ b/scripts/restore @@ -31,20 +31,6 @@ chmod -R g+w $install_dir/media/files/ chmod -R g+w $install_dir/media/images/ chmod -R g+w $install_dir/translations/ -#================================================= -# RESTORE THE PHP-FPM CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weight=1 - -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 #================================================= @@ -53,9 +39,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=1 + +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" chmod 644 "/etc/cron.d/$app" diff --git a/scripts/upgrade b/scripts/upgrade index a67c125..f8809cc 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -72,11 +72,6 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2 # 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=10 - # Create a dedicated NGINX config ynh_add_nginx_config