1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/leed_ynh.git synced 2024-09-03 19:26:32 +02:00

Remove 2.2 compatibility

This commit is contained in:
Maniack Crudelis 2016-11-08 13:32:06 +01:00
parent 35cbfc97f7
commit 7d8db7d7c7
3 changed files with 16 additions and 35 deletions

View file

@ -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"

View file

@ -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é.

View file

@ -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)