From 7d8db7d7c75c50bf81acf2ace77ef3fda0ad6360 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Tue, 8 Nov 2016 13:32:06 +0100 Subject: [PATCH] Remove 2.2 compatibility --- scripts/install | 32 ++++++++++---------------------- scripts/remove | 12 ++++-------- scripts/upgrade | 7 ++----- 3 files changed, 16 insertions(+), 35 deletions(-) diff --git a/scripts/install b/scripts/install index 096b8c8..6df7757 100644 --- a/scripts/install +++ b/scripts/install @@ -12,30 +12,18 @@ CLEAN_SETUP () { TRAP_ON # Active trap pour arrêter le script si une erreur est détectée. # Retrieve arguments -if [ $ynh_version = "2.4" ] -then - domain=$YNH_APP_ARG_DOMAIN - path=$YNH_APP_ARG_PATH - admin=$YNH_APP_ARG_ADMIN - user_pwd=$YNH_APP_ARG_PASSWORD - language=$YNH_APP_ARG_LANGUAGE - market=$YNH_APP_ARG_MARKET - is_public=$YNH_APP_ARG_IS_PUBLIC +domain=$YNH_APP_ARG_DOMAIN +path=$YNH_APP_ARG_PATH +admin=$YNH_APP_ARG_ADMIN +user_pwd=$YNH_APP_ARG_PASSWORD +language=$YNH_APP_ARG_LANGUAGE +market=$YNH_APP_ARG_MARKET +is_public=$YNH_APP_ARG_IS_PUBLIC - app=$YNH_APP_INSTANCE_NAME +app=$YNH_APP_INSTANCE_NAME - # Source app helpers - source /usr/share/yunohost/helpers -else - domain=$1 - path=$2 - admin=$3 - user_pwd=$4 - language=$5 - market=$6 - is_public=$7 - app=leed -fi +# Source app helpers +source /usr/share/yunohost/helpers # Vérifie que les variables ne sont pas vides. CHECK_VAR "$app" "app name not set" diff --git a/scripts/remove b/scripts/remove index 4eed15d..075dbd0 100644 --- a/scripts/remove +++ b/scripts/remove @@ -4,15 +4,11 @@ source .fonctions # Charge les fonctions génériques habituellement utilisées # Récupère les infos de l'application. YNH_VERSION # Récupère le numéro de version de Yunohost. -if [ $ynh_version = "2.4" ]; then - app=$YNH_APP_INSTANCE_NAME +app=$YNH_APP_INSTANCE_NAME + +# Source app helpers +source /usr/share/yunohost/helpers - # Source app helpers - source /usr/share/yunohost/helpers -else - app=leed - MYSQL_ROOT_PWD_FILE="/etc/yunohost/mysql" -fi domain=$(sudo yunohost app setting $app domain) REMOVE_BDD $app # Suppression de la base de donnée et de l'utilisateur associé. diff --git a/scripts/upgrade b/scripts/upgrade index 06058c2..8604c9b 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -4,11 +4,8 @@ source .fonctions # Charge les fonctions génériques habituellement utilisées # Récupère les infos de l'application. YNH_VERSION # Récupère le numéro de version de Yunohost. -if [ "$version" = "2.4" ]; then - app=$YNH_APP_INSTANCE_NAME -else - app=leed -fi +app=$YNH_APP_INSTANCE_NAME + domain=$(sudo yunohost app setting $app domain) path=$(sudo yunohost app setting $app path) admin=$(sudo yunohost app setting $app admin)