From 83c7f7a5604961195589b5f0fa3eb3eeb3efe168 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 7 Mar 2021 20:37:35 +0100 Subject: [PATCH] Cleaning up --- manifest.json | 2 +- scripts/install | 5 ++--- scripts/upgrade | 8 +++++++- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/manifest.json b/manifest.json index 00cadcb..2d31e18 100644 --- a/manifest.json +++ b/manifest.json @@ -14,7 +14,7 @@ "email": "" }, "requirements": { - "yunohost": ">= 4.0.0" + "yunohost": ">= 4.1.7" }, "multi_instance": true, "services": [ diff --git a/scripts/install b/scripts/install index beb9911..024573c 100755 --- a/scripts/install +++ b/scripts/install @@ -42,9 +42,8 @@ ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url #================================================= ynh_script_progression --message="Storing installation settings..." --weight=2 -ynh_app_setting_set --app=$app --key=domain --value=$domain -ynh_app_setting_set --app=$app --key=path --value=$path_url -ynh_app_setting_set --app=$app --key=is_public --value=$is_public +ynh_app_setting_set --app=$app --key=domain --value=$domain +ynh_app_setting_set --app=$app --key=path --value=$path_url #================================================= # STANDARD MODIFICATIONS diff --git a/scripts/upgrade b/scripts/upgrade index 3ffc386..fcdb3ae 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -17,7 +17,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) #================================================= @@ -46,6 +45,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 + #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #=================================================