From 8c194ada9df373c5b33fd9f29c3cff7a182d9cb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 26 Dec 2020 21:41:32 +0100 Subject: [PATCH 1/4] Set SVG badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9b7769e..99dc0bf 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Minchat for YunoHost [![Integration level](https://dash.yunohost.org/integration/minchat.svg)](https://dash.yunohost.org/appci/app/minchat) ![](https://ci-apps.yunohost.org/ci/badges/minchat.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/minchat.maintain.svg) -[![Install Minchat with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=minchat) +[![Install Minchat with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=minchat) *[Lire ce readme en français.](./README_fr.md)* From 5149c901071fe5ba22a78edd2786c5f5d9f31210 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 10 Mar 2021 22:17:04 +0100 Subject: [PATCH 2/4] Fix linter --- check_process | 1 - manifest.json | 6 +++--- scripts/install | 7 +++---- scripts/upgrade | 8 +++++++- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/check_process b/check_process index 3de3894..8fcde4f 100644 --- a/check_process +++ b/check_process @@ -14,5 +14,4 @@ upgrade=1 backup_restore=1 multi_instance=1 - incorrect_path=1 port_already_use=0 diff --git a/manifest.json b/manifest.json index 9f26658..b71fd85 100644 --- a/manifest.json +++ b/manifest.json @@ -6,19 +6,19 @@ "en": "Minimalist web chat", "fr": "Web chat minimaliste" }, - "version": "1.0~ynh2", + "version": "1.0~ynh3", "url": "https://github.com/wojtek77/chat", "license": "MIT", "maintainer": { "name": "chtixof" }, "requirements": { - "yunohost": ">> 3.8.1" + "yunohost": ">> 4.1.7" }, "multi_instance": true, "services": [ "nginx", - "php7.0-fpm" + "php7.3-fpm" ], "arguments": { "install" : [ diff --git a/scripts/install b/scripts/install index 4bc5e8b..4dfd6e4 100644 --- a/scripts/install +++ b/scripts/install @@ -47,7 +47,6 @@ ynh_script_progression --message="Storing installation settings..." --weight=1 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 #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -79,7 +78,7 @@ ynh_system_user_create --username=$app #================================================= ynh_script_progression --message="Configuring PHP-FPM..." --weight=1 -ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION +ynh_add_fpm_config phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= @@ -94,12 +93,12 @@ chown -R $app: $final_path #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring SSOwat..." --weight=3 +ynh_script_progression --message="Configuring permissions..." --weight=3 # Make app public if necessary or protect it if [ $is_public -eq 1 ] then - ynh_permission_update --permission "main" --add "visitors" + ynh_permission_update --permission="main" --add="visitors" fi #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 9ccd45b..db333d0 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) #================================================= @@ -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 + #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= From a28696c751e11298403c272ec8484f1f167da1ed Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 11 Mar 2021 08:39:26 +0100 Subject: [PATCH 3/4] Update upgrade --- scripts/upgrade | 9 --------- 1 file changed, 9 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index db333d0..35285bd 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -31,15 +31,6 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 -# Fix is_public as a boolean value -if [ "$is_public" = "Yes" ]; then - ynh_app_setting_set --app=$app --key=is_public --value=1 - is_public=1 -elif [ "$is_public" = "No" ]; then - ynh_app_setting_set --app=$app --key=is_public --value=0 - is_public=0 -fi - # If final_path doesn't exist, create it if [ -z "$final_path" ]; then final_path=/var/www/$app From cbbdaaaa3aa346340edf4035a27138b4affe2e4a Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 15 Mar 2021 09:13:37 +0100 Subject: [PATCH 4/4] Update manifest.json --- manifest.json | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/manifest.json b/manifest.json index b71fd85..de6cf9f 100644 --- a/manifest.json +++ b/manifest.json @@ -25,29 +25,17 @@ { "name": "domain", "type": "domain", - "ask": { - "en": "Choose a domain for Minchat", - "fr": "Choisissez un domaine pour Minchat" - }, "example": "domain.org" }, { "name": "path", "type": "path", - "ask": { - "en": "Choose a path for Minchat", - "fr": "Choisissez un chemin pour Minchat" - }, "example": "/minchat", "default": "/minchat" }, { "name": "is_public", "type": "boolean", - "ask": { - "en": "Is it a public site?", - "fr": "Est-ce un site public ?" - }, "default": true } ]