From e9f7fcfee9b5e59ffd9769878124e0a4f4631237 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 19 Dec 2022 21:17:44 +0100 Subject: [PATCH] fix --- scripts/install | 16 ++++++++-------- scripts/restore | 9 ++++++++- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/scripts/install b/scripts/install index a82c74e..d641b67 100755 --- a/scripts/install +++ b/scripts/install @@ -82,14 +82,6 @@ chown -R $app:www-data "$final_path" # rename tinyfilemanager to index mv $final_path/tinyfilemanager.php $final_path/index.php -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Configuring NGINX web server..." --weight=1 - -# Create a dedicated NGINX config -ynh_add_nginx_config - #================================================= # PHP-FPM CONFIGURATION #================================================= @@ -99,6 +91,14 @@ ynh_script_progression --message="Configuring PHP-FPM..." --weight=1 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 + #================================================= # CREATE DATA DIRECTORY #================================================= diff --git a/scripts/restore b/scripts/restore index c12aa70..52e9127 100755 --- a/scripts/restore +++ b/scripts/restore @@ -29,7 +29,7 @@ ynh_script_progression --message="Loading installation settings..." --weight=1 app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) -# path_url=$(ynh_app_setting_get --app=$app --key=path) +path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) datadir=$(ynh_app_setting_get --app=$app --key=datadir) @@ -100,6 +100,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..." --time --weight=1 + +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" + #================================================= # GENERIC FINALIZATION #=================================================