From fcc2dbf87c57c13fd57ab2fc779141857332d163 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 16 Jan 2023 09:34:39 +0100 Subject: [PATCH 1/5] Fix permissions --- conf/nginx.conf | 2 +- scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 508fc0a..9782b91 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -2,7 +2,7 @@ location __PATH__/ { # Path to source - alias __FINALPATH__/ ; + alias __FINALPATH__/; # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; diff --git a/scripts/install b/scripts/install index bdb3caf..2ee1e2d 100755 --- a/scripts/install +++ b/scripts/install @@ -56,7 +56,7 @@ mv ../sources/dist "$final_path" chmod 750 "$final_path" chmod -R o-rwx "$final_path" -chown -R root:www-data "$final_path" +chown -R $app:www-data "$final_path" #================================================= # NGINX CONFIGURATION diff --git a/scripts/restore b/scripts/restore index 3fbf90b..f26e496 100755 --- a/scripts/restore +++ b/scripts/restore @@ -53,7 +53,7 @@ ynh_restore_file "$final_path" chmod 750 "$final_path" chmod -R o-rwx "$final_path" -chown -R root:www-data "$final_path" +chown -R $app:www-data "$final_path" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index 7576cdc..a2fd9f7 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -76,7 +76,7 @@ fi chmod 750 "$final_path" chmod -R o-rwx "$final_path" -chown -R root:www-data "$final_path" +chown -R $app:www-data "$final_path" #================================================= # NGINX CONFIGURATION From abee1473b47829f609f193c7e00259fca3e0278d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 27 Jan 2023 12:33:56 +0100 Subject: [PATCH 2/5] Set user --- scripts/install | 8 ++++++++ scripts/remove | 10 ++++++++++ scripts/restore | 13 ++++++++++++- scripts/upgrade | 8 ++++++++ 4 files changed, 38 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 2ee1e2d..e92514b 100755 --- a/scripts/install +++ b/scripts/install @@ -45,6 +45,14 @@ 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 +#================================================= +# CREATE DEDICATED USER +#================================================= +ynh_script_progression --message="Configuring system user..." --weight=1 + +# Create a system user +ynh_system_user_create --username=$app --home_dir="$final_path" + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= diff --git a/scripts/remove b/scripts/remove index 6ddb24d..ca77eea 100755 --- a/scripts/remove +++ b/scripts/remove @@ -35,6 +35,16 @@ ynh_script_progression --message="Removing NGINX web server configuration..." -- # Remove the dedicated NGINX config ynh_remove_nginx_config +#================================================= +# GENERIC FINALIZATION +#================================================= +# REMOVE DEDICATED USER +#================================================= +ynh_script_progression --message="Removing the dedicated system user..." --weight=1 + +# Delete a system user +ynh_system_user_delete --username=$app + #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/restore b/scripts/restore index f26e496..12cdf29 100755 --- a/scripts/restore +++ b/scripts/restore @@ -33,7 +33,18 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= ynh_script_progression --message="Validating restoration parameters..." --weight=2 -test ! -d $final_path || ynh_die --message="There is already a directory: $final_path " +test ! -d $final_path \ + || ynh_die --message="There is already a directory: $final_path " + +#================================================= +# STANDARD RESTORATION STEPS +#================================================= +# RECREATE THE DEDICATED USER +#================================================= +ynh_script_progression --message="Recreating the dedicated system user..." --weight=1 + +# Create the dedicated user (if not existing) +ynh_system_user_create --username=$app --home_dir="$final_path" #================================================= # STANDARD RESTORATION STEPS diff --git a/scripts/upgrade b/scripts/upgrade index a2fd9f7..2efdde2 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -60,6 +60,14 @@ if ynh_legacy_permissions_exists; then ynh_app_setting_delete --app=$app --key=is_public fi +#================================================= +# CREATE DEDICATED USER +#================================================= +ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1 + +# Create a dedicated user (if not existing) +ynh_system_user_create --username=$app --home_dir="$final_path" + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= From 58ab8aad1c0cf90ba0f9b26d62eaf9c715c28ef9 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 27 Jan 2023 11:34:01 +0000 Subject: [PATCH 3/5] Auto-update README --- README.md | 2 +- README_fr.md | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index a4354ce..acc0526 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # Mindmaps for YunoHost -[![Integration level](https://dash.yunohost.org/integration/mindmaps.svg)](https://dash.yunohost.org/appci/app/mindmaps) ![Working status](https://ci-apps.yunohost.org/ci/badges/mindmaps.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/mindmaps.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/mindmaps.svg)](https://dash.yunohost.org/appci/app/mindmaps) ![Working status](https://ci-apps.yunohost.org/ci/badges/mindmaps.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/mindmaps.maintain.svg) [![Install Mindmaps with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mindmaps) *[Lire ce readme en français.](./README_fr.md)* diff --git a/README_fr.md b/README_fr.md index 64ee8b3..bb120c4 100644 --- a/README_fr.md +++ b/README_fr.md @@ -5,15 +5,15 @@ It shall NOT be edited by hand. # Mindmaps pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/mindmaps.svg)](https://dash.yunohost.org/appci/app/mindmaps) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/mindmaps.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/mindmaps.maintain.svg) +[![Niveau d’intégration](https://dash.yunohost.org/integration/mindmaps.svg)](https://dash.yunohost.org/appci/app/mindmaps) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/mindmaps.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/mindmaps.maintain.svg) [![Installer Mindmaps avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mindmaps) *[Read this readme in english.](./README.md)* -> *Ce package vous permet d'installer Mindmaps rapidement et simplement sur un serveur YunoHost. -Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* +> *Ce package vous permet d’installer Mindmaps rapidement et simplement sur un serveur YunoHost. +Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l’installer et en profiter.* -## Vue d'ensemble +## Vue d’ensemble Mindmaps est une application de mind mapping basée sur HTML5. Il vous permet de créer des cartes mentales soignées dans le navigateur. @@ -21,14 +21,14 @@ Mindmaps est une application de mind mapping basée sur HTML5. Il vous permet de **Démo :** https://www.mindmaps.app/ -## Captures d'écran +## Captures d’écran -![Capture d'écran de Mindmaps](./doc/screenshots/mindmaps-screenshot.jpg) +![Capture d’écran de Mindmaps](./doc/screenshots/mindmaps-screenshot.jpg) ## Documentations et ressources -* Site officiel de l'app : -* Dépôt de code officiel de l'app : +* Site officiel de l’app : +* Dépôt de code officiel de l’app : * Documentation YunoHost pour cette app : * Signaler un bug : @@ -44,4 +44,4 @@ ou sudo yunohost app upgrade mindmaps -u https://github.com/YunoHost-Apps/mindmaps_ynh/tree/testing --debug ``` -**Plus d'infos sur le packaging d'applications :** +**Plus d’infos sur le packaging d’applications :** \ No newline at end of file From 861b78014a3234127feabee40194ab8600d78feb Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 28 Jan 2023 08:27:50 +0100 Subject: [PATCH 4/5] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 905053f..7bc3fc4 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Tool for making mind maps", "fr": "Outil de creation de cartes mentales" }, - "version": "0.0.20201010~ynh2", + "version": "0.0.20201010~ynh3", "url": "https://www.mindmaps.app/", "upstream": { "license": "AGPL-3.0", From 6ad97398cc1227d27cc549be7d9075adad130295 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 28 Jan 2023 07:27:55 +0000 Subject: [PATCH 5/5] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index acc0526..c8d1681 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Mindmaps is a HTML5 based mind mapping application. It lets you create neat looking mind maps in the browser. -**Shipped version:** 0.0.20201010~ynh2 +**Shipped version:** 0.0.20201010~ynh3 **Demo:** https://www.mindmaps.app/ diff --git a/README_fr.md b/README_fr.md index bb120c4..9378083 100644 --- a/README_fr.md +++ b/README_fr.md @@ -17,7 +17,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po Mindmaps est une application de mind mapping basée sur HTML5. Il vous permet de créer des cartes mentales soignées dans le navigateur. -**Version incluse :** 0.0.20201010~ynh2 +**Version incluse :** 0.0.20201010~ynh3 **Démo :** https://www.mindmaps.app/