From c2f96cf3dc743ad1963926d8cd84981d59e5b816 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 14 Mar 2020 22:30:27 +0000 Subject: [PATCH] Do not install php7.3 if on Buster, it's already there --- scripts/install | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/scripts/install b/scripts/install index 31f84af6..5b094051 100644 --- a/scripts/install +++ b/scripts/install @@ -56,6 +56,17 @@ ynh_app_setting_set --app="$app" --key=app_key --value="$app_key" #================================================= # STANDARD MODIFICATIONS +#================================================= +# INSTALL PHP7.3 when on Stretch +#================================================= + +if [ "$(lsb_release --codename --short)" = "stretch" ]; then + ynh_print_info --message="Installing php7.3..." + ynh_install_php --phpversion="7.3" --package="$extra_pkg_dependencies" +else + pkg_dependencies="$pkg_dependencies $extra_pkg_dependencies" +fi + #================================================= # INSTALL DEPENDENCIES #================================================= @@ -63,13 +74,6 @@ ynh_print_info --message="Installing dependencies..." ynh_install_app_dependencies "$pkg_dependencies" -#================================================= -# INSTALL PHP -#================================================= -ynh_print_info --message="Installing php..." - -ynh_install_php --phpversion="7.3" --package="$extra_pkg_dependencies" - #================================================= # CREATE A POSTGRESQL DATABASE #=================================================