diff --git a/scripts/install b/scripts/install index 5c80e56..176c12f 100755 --- a/scripts/install +++ b/scripts/install @@ -56,9 +56,11 @@ ynh_app_setting_set --app=$app --key=user_home --value=$user_home #================================================= ynh_script_progression --message="Installing dependencies..." --weight=60 -ynh_install_app_dependencies $pkg_dependencies - -ynh_install_php --phpversion="$YNH_PHP_VERSION" --package="$extra_pkg_dependencies" +if [ "$(lsb_release --codename --short)" = "buster" ]; then + pkg_dependencies="$pkg_dependencies $extra_pkg_dependencies" +else + ynh_install_php --phpversion="$YNH_PHP_VERSION" --package="$extra_pkg_dependencies" +fi #================================================= # CREATE A MYSQL DATABASE diff --git a/scripts/remove b/scripts/remove index 9ea5c15..0246408 100755 --- a/scripts/remove +++ b/scripts/remove @@ -30,6 +30,10 @@ ynh_script_progression --message="Removing dependencies..." --weight=20 # Remove metapackage and its dependencies ynh_remove_app_dependencies +if [ "$(lsb_release --codename --short)" = "stretch" ]; then + ynh_remove_php +fi + #================================================= # REMOVE THE MYSQL DATABASE #================================================= diff --git a/scripts/restore b/scripts/restore index c62be63..569e956 100755 --- a/scripts/restore +++ b/scripts/restore @@ -93,10 +93,11 @@ ynh_restore_file --origin_path="/etc/php/$YNH_PHP_VERSION/fpm/pool.d/$app.conf" #================================================= ynh_script_progression --message="Reinstalling dependencies..." --weight=60 -# Define and install dependencies -ynh_install_app_dependencies $pkg_dependencies - -ynh_install_php --phpversion="$YNH_PHP_VERSION" --package="$extra_pkg_dependencies" +if [ "$(lsb_release --codename --short)" = "buster" ]; then + pkg_dependencies="$pkg_dependencies $extra_pkg_dependencies" +else + ynh_install_php --phpversion="$YNH_PHP_VERSION" --package="$extra_pkg_dependencies" +fi #================================================= # RESTORE THE CRON FILE diff --git a/scripts/upgrade b/scripts/upgrade index 8d109b4..020b400 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -137,9 +137,11 @@ path_url=$(ynh_normalize_url_path --path_url=$path_url) #================================================= ynh_script_progression --message="Upgrading dependencies..." --weight=7 -ynh_install_app_dependencies $pkg_dependencies - -ynh_install_php --phpversion="$YNH_PHP_VERSION" --package="$extra_pkg_dependencies" +if [ "$(lsb_release --codename --short)" = "buster" ]; then + pkg_dependencies="$pkg_dependencies $extra_pkg_dependencies" +else + ynh_install_php --phpversion="$YNH_PHP_VERSION" --package="$extra_pkg_dependencies" +fi #================================================= # STANDARD UPGRADE STEPS