From 35c988c89890569e47f09bdf67a6adb6b8863fce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 7 Sep 2022 12:59:59 +0200 Subject: [PATCH] reorder scripts --- scripts/install | 16 ++++++++-------- scripts/restore | 28 ++++++++++++++-------------- scripts/upgrade | 16 ++++++++-------- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/scripts/install b/scripts/install index 9169e1b..c229c00 100644 --- a/scripts/install +++ b/scripts/install @@ -95,14 +95,6 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Configuring NGINX web server..." --weight=1 - -# Create a dedicated NGINX config -ynh_add_nginx_config - #================================================= # PHP-FPM CONFIGURATION #================================================= @@ -112,6 +104,14 @@ ynh_script_progression --message="Configuring PHP-FPM..." --weight=2 ynh_add_fpm_config phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) +#================================================= +# NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Configuring NGINX web server..." --weight=1 + +# Create a dedicated NGINX config +ynh_add_nginx_config + #================================================= # SPECIFIC SETUP #================================================= diff --git a/scripts/restore b/scripts/restore index e87e437..6c05c96 100644 --- a/scripts/restore +++ b/scripts/restore @@ -46,20 +46,6 @@ fi #================================================= # STANDARD RESTORATION STEPS -#================================================= -# REINSTALL DEPENDENCIES -#================================================= -ynh_script_progression --message="Reinstalling dependencies..." --weight=5 - -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" - #================================================= # RECREATE THE DEDICATED USER #================================================= @@ -96,6 +82,13 @@ ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./ chown $app: "$final_path/config/baikal.yaml" chmod 640 "$final_path/config/baikal.yaml" +#================================================= +# REINSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Reinstalling dependencies..." --weight=5 + +ynh_install_app_dependencies $pkg_dependencies + #================================================= # RESTORE THE PHP-FPM CONFIGURATION #================================================= @@ -103,6 +96,13 @@ 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 web server configuration..." --weight=1 + +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" + #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index f92c1e8..9fc6ea3 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -108,14 +108,6 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1 - -# Create a dedicated NGINX config -ynh_add_nginx_config - #================================================= # UPGRADE DEPENDENCIES #================================================= @@ -131,6 +123,14 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2 # Create a dedicated PHP-FPM config ynh_add_fpm_config +#================================================= +# NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1 + +# Create a dedicated NGINX config +ynh_add_nginx_config + #================================================= # SPECIFIC UPGRADE #=================================================