From 0f51aec95cfe91a46aac7a9c09ab468bb8766df3 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Mon, 22 Mar 2021 12:53:01 +0100 Subject: [PATCH] Fix linter warnings --- manifest.json | 18 +----------------- scripts/upgrade | 8 +++++++- 2 files changed, 8 insertions(+), 18 deletions(-) diff --git a/manifest.json b/manifest.json index 7ad7a51..e8ad688 100644 --- a/manifest.json +++ b/manifest.json @@ -14,7 +14,7 @@ "email": "tituspijean@outlook.com" }, "requirements": { - "yunohost": ">= 3.8.1" + "yunohost": ">= 4.1.2" }, "services": [], "multi_instance": false, @@ -23,10 +23,6 @@ { "name": "domain", "type": "domain", - "ask": { - "en": "Choose a domain name for ztncui", - "fr": "Choisissez un nom de domaine pour ztncui" - }, "help": { "en": "REMINDER: ztncui needs the ZeroTier app to be already installed.", "fr": "RAPPEL: ztncui nécessite que l'app ZeroTier soit déjà installée." @@ -36,10 +32,6 @@ { "name": "is_public", "type": "boolean", - "ask": { - "en": "Is it a public application?", - "fr": "Est-ce une application publique ?" - }, "help": { "en": "Ztncui has its own login system, but setting it as private is advised.", "fr": "Ztncui a son propre système de connexion, mais la rendre privée est conseillé." @@ -49,19 +41,11 @@ { "name": "admin", "type": "user", - "ask": { - "en": "Choose an admin user", - "fr": "Choisissez l’administrateur" - }, "example": "johndoe" }, { "name": "password", "type": "password", - "ask": { - "en": "Set the administrator password", - "fr": "Définissez le mot de passe administrateur" - }, "help": { "en": "It will always be asked by Ztncui, in addition to your YunoHost credentials if set to private.", "fr": "Il sera toujours demandé par Ztncui, en plus des identifiants YunoHost si l'app est privée." diff --git a/scripts/upgrade b/scripts/upgrade index 1b72274..5fe72d8 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -18,7 +18,6 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) -is_public=$(ynh_app_setting_get --app=$app --key=is_public) final_path=$(ynh_app_setting_get --app=$app --key=final_path) port=$(ynh_app_setting_get --app=$app --key=port) admin=$(ynh_app_setting_get --app=$app --key=admin) @@ -47,6 +46,13 @@ if [ -z "$final_path" ]; then ynh_app_setting_set --app=$app --key=final_path --value=$final_path fi +# Cleaning legacy permissions +if ynh_legacy_permissions_exists; then + ynh_legacy_permissions_delete_all + + ynh_app_setting_delete --app=$app --key=is_public +fi + # If admin or password do not exist, assign the standard ones and have them replaced upon first login if [ -z "$admin" ] || [ -z "$hashedpassword" ]; then admin="admin"