From a446b86bcced733f14b92dded1e3e5b14ed9d6aa Mon Sep 17 00:00:00 2001 From: Kay0u Date: Fri, 27 Mar 2020 14:17:52 +0100 Subject: [PATCH] Fix Buster --- manifest.json | 2 +- scripts/install | 9 +++++++-- scripts/remove | 5 ++++- scripts/restore | 10 +++++++--- scripts/upgrade | 9 +++++++-- 5 files changed, 26 insertions(+), 9 deletions(-) diff --git a/manifest.json b/manifest.json index c843332..fe47b20 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Moodle package for YunoHost application.", "fr": "Moodle de package d’application pour YunoHost." }, - "version": "3.8.2", + "version": "3.8.2~ynh2", "url": "https://moodle.org/", "license": "GPL-3.0-or-later", "maintainer": { diff --git a/scripts/install b/scripts/install index 21f4e35..f3c787d 100644 --- a/scripts/install +++ b/scripts/install @@ -59,8 +59,13 @@ ynh_app_setting_set --app=$app --key=is_public --value=$is_public #================================================= 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)" = "stretch" ]; then + ynh_install_app_dependencies $pkg_dependencies + ynh_install_php --phpversion="$YNH_PHP_VERSION" --package="$extra_pkg_dependencies" +else + pkg_dependencies="$pkg_dependencies $extra_pkg_dependencies" + ynh_install_app_dependencies $pkg_dependencies +fi #================================================= # CREATE POSTGRESQL DATABASE diff --git a/scripts/remove b/scripts/remove index 105f20e..bce7299 100644 --- a/scripts/remove +++ b/scripts/remove @@ -64,7 +64,10 @@ ynh_script_progression --message="Removing php-fpm configuration..." --weight=20 # Remove the dedicated php-fpm config ynh_remove_fpm_config -ynh_remove_php "$YNH_PHP_VERSION" + +if [ "$(lsb_release --codename --short)" = "stretch" ]; then + ynh_remove_php +fi #================================================= # SPECIFIC REMOVE diff --git a/scripts/restore b/scripts/restore index b3aa75a..f5b810f 100644 --- a/scripts/restore +++ b/scripts/restore @@ -89,9 +89,13 @@ 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)" = "stretch" ]; then + ynh_install_app_dependencies $pkg_dependencies + ynh_install_php --phpversion="$YNH_PHP_VERSION" --package="$extra_pkg_dependencies" +else + pkg_dependencies="$pkg_dependencies $extra_pkg_dependencies" + ynh_install_app_dependencies $pkg_dependencies +fi #================================================= # RESTORE THE POSTGRESQL DATABASE diff --git a/scripts/upgrade b/scripts/upgrade index 80abc43..91ac469 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -83,8 +83,13 @@ ynh_add_nginx_config YNH_PHP_VERSION #================================================= ynh_script_progression --message="Upgrading dependencies..." --weight=30 -ynh_install_app_dependencies $pkg_dependencies -ynh_install_php --phpversion="$YNH_PHP_VERSION" --package="$extra_pkg_dependencies" +if [ "$(lsb_release --codename --short)" = "stretch" ]; then + ynh_install_app_dependencies $pkg_dependencies + ynh_install_php --phpversion="$YNH_PHP_VERSION" --package="$extra_pkg_dependencies" +else + pkg_dependencies="$pkg_dependencies $extra_pkg_dependencies" + ynh_install_app_dependencies $pkg_dependencies +fi #================================================= # CREATE DEDICATED USER