From 5a739f9b6df3c538f40ca58845a4e3e237233183 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Tue, 15 Sep 2020 10:40:49 +0200 Subject: [PATCH] Specify the php version --- scripts/_common.sh | 4 +++- scripts/upgrade | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index dfc713b..6eef4b8 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,7 +5,9 @@ #================================================= # dependencies used by the app -pkg_dependencies="php-xml php-mbstring php-mysql" +YNH_PHP_VERSION="7.3" + +pkg_dependencies="php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-mysql" #================================================= # EXPERIMENTAL HELPERS diff --git a/scripts/upgrade b/scripts/upgrade index b9495d9..a4dcc05 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -94,6 +94,7 @@ ynh_script_progression --message="Upgrading nginx web server configuration..." # Create a dedicated nginx config ynh_add_nginx_config +phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # UPGRADE DEPENDENCIES @@ -129,7 +130,7 @@ then ynh_script_progression --message="Upgrading baikal..." # Run Baikal upgrade - php "${final_path}/bin/upgrade.sh" + php"${phpversion}" "${final_path}/bin/upgrade.sh" # Cleanup old baikal-admin sessions # since we may have changed owner of the session file