From bcab74253f1042262a2a00a577ad1cffeee8af72 Mon Sep 17 00:00:00 2001 From: maniack Date: Sun, 9 Feb 2020 18:27:35 +0100 Subject: [PATCH] Adapt the code accordingly to https://github.com/YunoHost/yunohost/pull/879 --- scripts/install | 4 +--- scripts/upgrade | 23 ++++++++--------------- 2 files changed, 9 insertions(+), 18 deletions(-) diff --git a/scripts/install b/scripts/install index e03a016..4cbacc8 100755 --- a/scripts/install +++ b/scripts/install @@ -75,8 +75,6 @@ ynh_app_setting_set --app=$app --key=admin --value=$admin ynh_app_setting_set --app=$app --key=is_public --value=$is_public ynh_app_setting_set --app=$app --key=language --value=$language -ynh_app_setting_set --app=$app --key=phpversion --value=$YNH_DEFAULT_PHP_VERSION - #================================================= # STANDARD MODIFICATIONS #================================================= @@ -155,7 +153,7 @@ ynh_script_progression --message="Configuring nginx web server..." --time --weig ### `ynh_add_nginx_config` will use the file conf/nginx.conf # Create a dedicated nginx config -ynh_add_nginx_config php_version +ynh_add_nginx_config #================================================= # CREATE DEDICATED USER diff --git a/scripts/upgrade b/scripts/upgrade index 65727b4..ef79017 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -23,7 +23,6 @@ is_public=$(ynh_app_setting_get --app=$app --key=is_public) final_path=$(ynh_app_setting_get --app=$app --key=final_path) language=$(ynh_app_setting_get --app=$app --key=language) db_name=$(ynh_app_setting_get --app=$app --key=db_name) -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # CHECK VERSION @@ -63,12 +62,6 @@ if [ -z "$final_path" ]; then ynh_app_setting_set --app=$app --key=final_path --value=$final_path fi -# If phpversion doesn't exist, create it -if [ -z "$phpversion" ]; then - phpversion=$YNH_DEFAULT_PHP_VERSION - ynh_app_setting_set --app=$app --key=phpversion --value=$phpversion -fi - #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= @@ -123,6 +116,14 @@ ynh_script_progression --message="Upgrading dependencies..." --time --weight=1 ynh_install_app_dependencies $pkg_dependencies +#================================================= +# NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Upgrading nginx web server configuration..." --time --weight=1 + +# Create a dedicated nginx config +ynh_add_nginx_config + #================================================= # CREATE DEDICATED USER #================================================= @@ -139,14 +140,6 @@ ynh_script_progression --message="Upgrading php-fpm configuration..." --time --w # Create a dedicated php-fpm config ynh_add_fpm_config -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Upgrading nginx web server configuration..." --time --weight=1 - -# Create a dedicated nginx config -ynh_add_nginx_config php_version - #================================================= # SPECIFIC UPGRADE #=================================================