From 906f3dc7ec16a02bd91a6776617c94ff094c6f78 Mon Sep 17 00:00:00 2001 From: rodinux Date: Sat, 6 Apr 2024 12:25:40 +0200 Subject: [PATCH 01/11] move the configs mail, let users be avalaible change them if needed --- conf/config.local.php | 16 +++--- conf/config.local.user.php | 101 +++++++++++++++++++++++++++++++++++++ manifest.toml | 2 +- 3 files changed, 110 insertions(+), 9 deletions(-) diff --git a/conf/config.local.php b/conf/config.local.php index 1dfb6ab..09a7e21 100644 --- a/conf/config.local.php +++ b/conf/config.local.php @@ -412,7 +412,7 @@ const USE_CRON = true; * Défaut : false */ -const SMTP_HOST = '__DOMAIN__'; +//const SMTP_HOST = '__DOMAIN__'; /** * Port du serveur SMTP @@ -423,7 +423,7 @@ const SMTP_HOST = '__DOMAIN__'; * Défaut : 587 */ -const SMTP_PORT = 25; +//const SMTP_PORT = 25; /** * Login utilisateur pour le server SMTP @@ -433,7 +433,7 @@ const SMTP_PORT = 25; * Défaut : null */ -const SMTP_USER = '__APP__'; +//const SMTP_USER = '__APP__'; /** * Mot de passe pour le serveur SMTP @@ -443,7 +443,7 @@ const SMTP_USER = '__APP__'; * Défaut : null */ -const SMTP_PASSWORD = '__MAIL_PWD__'; +//const SMTP_PASSWORD = '__MAIL_PWD__'; /** * Sécurité du serveur SMTP @@ -456,7 +456,7 @@ const SMTP_PASSWORD = '__MAIL_PWD__'; * Défaut : STARTTLS */ -const SMTP_SECURITY = 'STARTTLS'; +//const SMTP_SECURITY = 'STARTTLS'; /** * Nom du serveur utilisé dans le HELO SMTP @@ -469,7 +469,7 @@ const SMTP_SECURITY = 'STARTTLS'; * @var null|string */ -const SMTP_HELO_HOSTNAME = '__DOMAIN__'; +//const SMTP_HELO_HOSTNAME = '__DOMAIN__'; /** * Adresse e-mail destinée à recevoir les erreurs de mail @@ -485,7 +485,7 @@ const SMTP_HELO_HOSTNAME = '__DOMAIN__'; * Défaut : null */ -const MAIL_RETURN_PATH = '__APP__@__DOMAIN__'; +//const MAIL_RETURN_PATH = '__APP__@__DOMAIN__'; /** @@ -503,7 +503,7 @@ const MAIL_RETURN_PATH = '__APP__@__DOMAIN__'; * Défaut : null */ -const MAIL_SENDER = '__APP__@__DOMAIN__'; +//const MAIL_SENDER = '__APP__@__DOMAIN__'; /** * Mot de passe pour l'accès à l'API permettant de gérer les mails d'erreur diff --git a/conf/config.local.user.php b/conf/config.local.user.php index 84f945d..aeecd42 100644 --- a/conf/config.local.user.php +++ b/conf/config.local.user.php @@ -10,3 +10,104 @@ // Nécessaire pour situer les constantes dans le bon namespace namespace Paheko; + +/** + * Hôte du serveur SMTP, mettre à false (défaut) pour utiliser la fonction + * mail() de PHP + * + * Défaut : false + */ + +const SMTP_HOST = '__DOMAIN__'; + +/** + * Port du serveur SMTP + * + * 25 = port standard pour connexion non chiffrée (465 pour Gmail) + * 587 = port standard pour connexion SSL + * + * Défaut : 587 + */ + +const SMTP_PORT = 25; + +/** + * Login utilisateur pour le server SMTP + * + * mettre à null pour utiliser un serveur local ou anonyme + * + * Défaut : null + */ + +const SMTP_USER = '__APP__'; + +/** + * Mot de passe pour le serveur SMTP + * + * mettre à null pour utiliser un serveur local ou anonyme + * + * Défaut : null + */ + +const SMTP_PASSWORD = '__MAIL_PWD__'; + +/** + * Sécurité du serveur SMTP + * + * NONE = pas de chiffrement + * SSL = connexion SSL native + * TLS = connexion TLS native (le plus sécurisé) + * STARTTLS = utilisation de STARTTLS (moyennement sécurisé) + * + * Défaut : STARTTLS + */ + +const SMTP_SECURITY = 'STARTTLS'; + +/** + * Nom du serveur utilisé dans le HELO SMTP + * + * Si NULL, alors le nom renseigné comme SERVER_NAME (premier nom du virtual host Apache) + * sera utilisé. + * + * Defaut : NULL + * + * @var null|string + */ + +const SMTP_HELO_HOSTNAME = '__DOMAIN__'; + +/** + * Adresse e-mail destinée à recevoir les erreurs de mail + * (adresses invalides etc.) — Return-Path + * + * Si laissé NULL, alors l'adresse e-mail de l'association sera utilisée. + * En cas d'hébergement de plusieurs associations, il est conseillé + * d'utiliser une adresse par association. + * + * Voir la documentation de configuration sur des exemples de scripts + * permettant de traiter les mails reçus à cette adresse. + * + * Défaut : null + */ + +const MAIL_RETURN_PATH = '__APP__@__DOMAIN__'; + + +/** + * Adresse e-mail expéditrice des messages (Sender) + * + * Si vous envoyez des mails pour plusieurs associations, il est souhaitable + * de forcer l'adresse d'expéditeur des messages pour passer les règles SPF et DKIM. + * + * Dans ce cas l'adresse de l'association sera indiquée en "Reply-To", et + * l'adresse contenue dans MAIL_SENDER sera dans le From. + * + * Si laissé NULL, c'est l'adresse de l'association indiquée dans la configuration + * qui sera utilisée. + * + * Défaut : null + */ + +const MAIL_SENDER = '__APP__@__DOMAIN__'; + diff --git a/manifest.toml b/manifest.toml index 4bab0e9..8ec7626 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Paheko" description.en = "Association management software" description.fr = "Logiciel de gestion d'association" -version = "1.3.6~ynh2" +version = "1.3.6~ynh3" maintainers = ["rodinux"] From 1132af7029588474ec0a10c88deb24860c349985 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 6 Apr 2024 11:14:32 +0000 Subject: [PATCH 02/11] Auto-update READMEs --- ALL_README.md | 6 ++++++ README.md | 30 +++++++++++++++--------------- README_eu.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ README_fr.md | 32 ++++++++++++++++---------------- README_gl.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 137 insertions(+), 31 deletions(-) create mode 100644 ALL_README.md create mode 100644 README_eu.md create mode 100644 README_gl.md diff --git a/ALL_README.md b/ALL_README.md new file mode 100644 index 0000000..77b7509 --- /dev/null +++ b/ALL_README.md @@ -0,0 +1,6 @@ +# All available README files by language + +- [Read the README in English](README.md) +- [Irakurri README euskaraz](README_eu.md) +- [Lire le README en français](README_fr.md) +- [Le o README en galego](README_gl.md) diff --git a/README.md b/README.md index 9b6221b..d25db0f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ @@ -9,19 +9,19 @@ It shall NOT be edited by hand. [![Install Paheko with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=paheko) -*[Lire ce readme en français.](./README_fr.md)* +*[Read this README in other languages.](./ALL_README.md)* -> *This package allows you to install Paheko quickly and simply on a YunoHost server. -If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.* +> *This package allows you to install Paheko quickly and simply on a YunoHost server.* +> *If you don't have YunoHost, please consult [the guide](https://yunohost.org/install) to learn how to install it.* ## Overview Paheko (a word from the Māori language meaning "to cooperate", illustrating the purpose of the software: to improve together the daily management of an association) is software for associative management. It is the tool of choice for managing an association, a sports club, an NGO, etc. It is designed to meet the needs of a small to medium-sized structure: management of members, accounting, website, note-taking in meetings, archiving and sharing of the association's operating documents, discussion between members. -**Shipped version:** 1.3.6~ynh2 +**Shipped version:** 1.3.6~ynh3 -**Demo:** https://paheko.cloud/essai/ +**Demo:** ## Screenshots @@ -29,22 +29,22 @@ Paheko (a word from the Māori language meaning "to cooperate", illustrating the ## Documentation and resources -* Official app website: -* Official admin documentation: -* Upstream app code repository: -* YunoHost Store: -* Report a bug: +- Official app website: +- Official admin documentation: +- Upstream app code repository: +- YunoHost Store: +- Report a bug: ## Developer info -Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/paheko_ynh/tree/testing). +Please send your pull request to the [`testing` branch](https://github.com/YunoHost-Apps/paheko_ynh/tree/testing). -To try the testing branch, please proceed like that. +To try the `testing` branch, please proceed like that: -``` bash +```bash sudo yunohost app install https://github.com/YunoHost-Apps/paheko_ynh/tree/testing --debug or sudo yunohost app upgrade paheko -u https://github.com/YunoHost-Apps/paheko_ynh/tree/testing --debug ``` -**More info regarding app packaging:** \ No newline at end of file +**More info regarding app packaging:** diff --git a/README_eu.md b/README_eu.md new file mode 100644 index 0000000..3fea5e9 --- /dev/null +++ b/README_eu.md @@ -0,0 +1,50 @@ + + +# Paheko YunoHost-erako + +[![Integrazio maila](https://dash.yunohost.org/integration/paheko.svg)](https://dash.yunohost.org/appci/app/paheko) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/paheko.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/paheko.maintain.svg) + +[![Instalatu Paheko YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=paheko) + +*[Irakurri README hau beste hizkuntzatan.](./ALL_README.md)* + +> *Pakete honek Paheko YunoHost zerbitzari batean azkar eta zailtasunik gabe instalatzea ahalbidetzen dizu.* +> *YunoHost ez baduzu, kontsultatu [gida](https://yunohost.org/install) nola instalatu ikasteko.* + +## Aurreikuspena + +Paheko (a word from the Māori language meaning "to cooperate", illustrating the purpose of the software: to improve together the daily management of an association) is software for associative management. It is the tool of choice for managing an association, a sports club, an NGO, etc. It is designed to meet the needs of a small to medium-sized structure: management of members, accounting, website, note-taking in meetings, archiving and sharing of the association's operating documents, discussion between members. + + +**Paketatutako bertsioa:** 1.3.6~ynh3 + +**Demoa:** + +## Pantaila-argazkiak + +![Paheko(r)en pantaila-argazkia](./doc/screenshots/screenshot.png) + +## Dokumentazioa eta baliabideak + +- Aplikazioaren webgune ofiziala: +- Administratzaileen dokumentazio ofiziala: +- Jatorrizko aplikazioaren kode-gordailua: +- YunoHost Denda: +- Eman errore baten berri: + +## Garatzaileentzako informazioa + +Bidali `pull request`a [`testing` abarrera](https://github.com/YunoHost-Apps/paheko_ynh/tree/testing). + +`testing` abarra probatzeko, ondorengoa egin: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/paheko_ynh/tree/testing --debug +edo +sudo yunohost app upgrade paheko -u https://github.com/YunoHost-Apps/paheko_ynh/tree/testing --debug +``` + +**Informazio gehiago aplikazioaren paketatzeari buruz:** diff --git a/README_fr.md b/README_fr.md index 643b88d..55ff871 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,6 +1,6 @@ # Paheko pour YunoHost @@ -9,19 +9,19 @@ It shall NOT be edited by hand. [![Installer Paheko avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=paheko) -*[Read this readme in english.](./README.md)* +*[Lire le README dans d'autres langues.](./ALL_README.md)* -> *Ce package vous permet d’installer Paheko 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 Paheko rapidement et simplement sur un serveur YunoHost.* +> *Si vous n’avez pas YunoHost, consultez [ce guide](https://yunohost.org/install) pour savoir comment l’installer et en profiter.* ## Vue d’ensemble Paheko (mot de la langue Māori qui signifie « coopérer », illustrant le but du logiciel : améliorer ensemble le quotidien de la gestion d'une association) est un logiciel de gestion associative. Il est l'outil de prédilection pour gérer une association, un club sportif, une ONG, etc. Il est conçu pour répondre aux besoins d'une structure de petite à moyenne taille : gestion des adhérents, comptabilité, site web, prise de notes en réunion, archivage et partage des documents de fonctionnement de l'association, discussion entre adhérents. -**Version incluse :** 1.3.6~ynh2 +**Version incluse :** 1.3.6~ynh3 -**Démo :** https://paheko.cloud/essai/ +**Démo :** ## Captures d’écran @@ -29,22 +29,22 @@ Paheko (mot de la langue Māori qui signifie « coopérer », illustrant le but ## Documentations et ressources -* Site officiel de l’app : -* Documentation officielle de l’admin : -* Dépôt de code officiel de l’app : -* YunoHost Store: -* Signaler un bug : +- Site officiel de l’app : +- Documentation officielle de l’admin : +- Dépôt de code officiel de l’app : +- YunoHost Store : +- Signaler un bug : ## Informations pour les développeurs -Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/paheko_ynh/tree/testing). +Merci de faire vos pull request sur la [branche `testing`](https://github.com/YunoHost-Apps/paheko_ynh/tree/testing). -Pour essayer la branche testing, procédez comme suit. +Pour essayer la branche `testing`, procédez comme suit : -``` bash +```bash sudo yunohost app install https://github.com/YunoHost-Apps/paheko_ynh/tree/testing --debug ou sudo yunohost app upgrade paheko -u https://github.com/YunoHost-Apps/paheko_ynh/tree/testing --debug ``` -**Plus d’infos sur le packaging d’applications :** \ No newline at end of file +**Plus d’infos sur le packaging d’applications :** diff --git a/README_gl.md b/README_gl.md new file mode 100644 index 0000000..5ce45ef --- /dev/null +++ b/README_gl.md @@ -0,0 +1,50 @@ + + +# Paheko para YunoHost + +[![Nivel de integración](https://dash.yunohost.org/integration/paheko.svg)](https://dash.yunohost.org/appci/app/paheko) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/paheko.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/paheko.maintain.svg) + +[![Instalar Paheko con YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=paheko) + +*[Le este README en outros idiomas.](./ALL_README.md)* + +> *Este paquete permíteche instalar Paheko de xeito rápido e doado nun servidor YunoHost.* +> *Se non usas YunoHost, le a [documentación](https://yunohost.org/install) para saber como instalalo.* + +## Vista xeral + +Paheko (a word from the Māori language meaning "to cooperate", illustrating the purpose of the software: to improve together the daily management of an association) is software for associative management. It is the tool of choice for managing an association, a sports club, an NGO, etc. It is designed to meet the needs of a small to medium-sized structure: management of members, accounting, website, note-taking in meetings, archiving and sharing of the association's operating documents, discussion between members. + + +**Versión proporcionada:** 1.3.6~ynh3 + +**Demo:** + +## Capturas de pantalla + +![Captura de pantalla de Paheko](./doc/screenshots/screenshot.png) + +## Documentación e recursos + +- Web oficial da app: +- Documentación oficial para admin: +- Repositorio de orixe do código: +- Tenda YunoHost: +- Informar dun problema: + +## Info de desenvolvemento + +Envía a túa colaboración á [rama `testing`](https://github.com/YunoHost-Apps/paheko_ynh/tree/testing). + +Para probar a rama `testing`, procede deste xeito: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/paheko_ynh/tree/testing --debug +ou +sudo yunohost app upgrade paheko -u https://github.com/YunoHost-Apps/paheko_ynh/tree/testing --debug +``` + +**Máis info sobre o empaquetado da app:** From 13db48b0fa1f0134a0b995fa2729716a69dfd9dc Mon Sep 17 00:00:00 2001 From: rodinux Date: Sat, 6 Apr 2024 13:22:54 +0200 Subject: [PATCH 03/11] force the upgrade of config.local.user.php with mail --- scripts/upgrade | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index d652b3d..ab45aac 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -121,6 +121,11 @@ if [ ! -f "$data_dir/data/config.local.user.php" ]; then ynh_add_config --template="config.local.user.php" --destination="$data_dir/data/config.local.user.php" chmod 640 "$data_dir/data/config.local.user.php" chown $app:$app "$data_dir/data/config.local.user.php" +elif + ynh_script_progression --message="Adding a configuration file..." --weight=5 + ynh_add_config --template="config.local.user.php" --destination="$data_dir/data/config.local.user.php" + chmod 640 "$data_dir/data/config.local.user.php" + chown $app:$app "$data_dir/data/config.local.user.php" fi if [ -f "$install_dir/data/association.sqlite" ]; then From 60d88ed7f00fbf17f9d424052c9dd88df9041104 Mon Sep 17 00:00:00 2001 From: rodinux Date: Sat, 6 Apr 2024 13:37:28 +0200 Subject: [PATCH 04/11] keep also old configs --- scripts/upgrade | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index ab45aac..a8eed9b 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -121,8 +121,11 @@ if [ ! -f "$data_dir/data/config.local.user.php" ]; then ynh_add_config --template="config.local.user.php" --destination="$data_dir/data/config.local.user.php" chmod 640 "$data_dir/data/config.local.user.php" chown $app:$app "$data_dir/data/config.local.user.php" -elif +fi + +if ynh_compare_current_package_version --comparison lt 1.3.6~ynh2; then ynh_script_progression --message="Adding a configuration file..." --weight=5 + mv "$data_dir/data/config.local.user.php" "$data_dir/data/config.local.user.php.old" ynh_add_config --template="config.local.user.php" --destination="$data_dir/data/config.local.user.php" chmod 640 "$data_dir/data/config.local.user.php" chown $app:$app "$data_dir/data/config.local.user.php" From b7bc1fd1980c9a51829235a476943ac8e1b73fb0 Mon Sep 17 00:00:00 2001 From: rodinux Date: Sat, 6 Apr 2024 14:04:43 +0200 Subject: [PATCH 05/11] fix comparaison --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index a8eed9b..53a568f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -123,7 +123,7 @@ if [ ! -f "$data_dir/data/config.local.user.php" ]; then chown $app:$app "$data_dir/data/config.local.user.php" fi -if ynh_compare_current_package_version --comparison lt 1.3.6~ynh2; then +if ynh_compare_current_package_version --comparison le 1.3.6~ynh2; then ynh_script_progression --message="Adding a configuration file..." --weight=5 mv "$data_dir/data/config.local.user.php" "$data_dir/data/config.local.user.php.old" ynh_add_config --template="config.local.user.php" --destination="$data_dir/data/config.local.user.php" From d8e9d65d36999d959a122f8da15bb98d938271d0 Mon Sep 17 00:00:00 2001 From: rodinux Date: Sat, 6 Apr 2024 14:13:08 +0200 Subject: [PATCH 06/11] fix comparaison --- scripts/upgrade | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 53a568f..523e114 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -57,6 +57,14 @@ if [ -d "$install_dir/data/data" ]; then ynh_secure_remove "$install_dir/data/data" fi +if ynh_compare_current_package_version --comparison le 1.3.6~ynh2; then + ynh_script_progression --message="keep old user configuration file..." --weight=5 + mv "$data_dir/data/config.local.user.php" "$data_dir/data/config.local.user.php.old" + ynh_add_config --template="config.local.user.php" --destination="$data_dir/data/config.local.user.php" + chmod 640 "$data_dir/data/config.local.user.php" + chown $app:$app "$data_dir/data/config.local.user.php" +fi + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -72,6 +80,7 @@ fi chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" + #================================================= # REAPPLY SYSTEM CONFIGURATIONS #================================================= @@ -123,13 +132,6 @@ if [ ! -f "$data_dir/data/config.local.user.php" ]; then chown $app:$app "$data_dir/data/config.local.user.php" fi -if ynh_compare_current_package_version --comparison le 1.3.6~ynh2; then - ynh_script_progression --message="Adding a configuration file..." --weight=5 - mv "$data_dir/data/config.local.user.php" "$data_dir/data/config.local.user.php.old" - ynh_add_config --template="config.local.user.php" --destination="$data_dir/data/config.local.user.php" - chmod 640 "$data_dir/data/config.local.user.php" - chown $app:$app "$data_dir/data/config.local.user.php" -fi if [ -f "$install_dir/data/association.sqlite" ]; then ynh_script_progression --message="Moving db files..." --weight=5 From 4433219b079cd38b403f8dd4222d8aab4984a54c Mon Sep 17 00:00:00 2001 From: rodinux Date: Sat, 6 Apr 2024 14:23:50 +0200 Subject: [PATCH 07/11] fix comparaison --- scripts/upgrade | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 523e114..e7c92f9 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -57,13 +57,6 @@ if [ -d "$install_dir/data/data" ]; then ynh_secure_remove "$install_dir/data/data" fi -if ynh_compare_current_package_version --comparison le 1.3.6~ynh2; then - ynh_script_progression --message="keep old user configuration file..." --weight=5 - mv "$data_dir/data/config.local.user.php" "$data_dir/data/config.local.user.php.old" - ynh_add_config --template="config.local.user.php" --destination="$data_dir/data/config.local.user.php" - chmod 640 "$data_dir/data/config.local.user.php" - chown $app:$app "$data_dir/data/config.local.user.php" -fi #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -111,6 +104,14 @@ chown $app:$app "$install_dir/config.local.php" ynh_replace_string --match_string="//require '$data_dir/data/config.local.user.php';" --replace_string="require '$data_dir/data/config.local.user.php';" --target_file="$install_dir/config.local.php" +if ynh_compare_current_package_version --comparison le 1.3.6~ynh2; then + ynh_script_progression --message="keep old user configuration file..." --weight=5 + mv "$data_dir/data/config.local.user.php" "$data_dir/data/config.local.user.php.old" + ynh_add_config --template="config.local.user.php" --destination="$data_dir/data/config.local.user.php" + chmod 640 "$data_dir/data/config.local.user.php" + chown $app:$app "$data_dir/data/config.local.user.php" +fi + #================================================= # ADD A CONFIG FILE #================================================= From f4dce8e8a37b546ef2736d6cf3d40f4862c3b5e7 Mon Sep 17 00:00:00 2001 From: rodinux Date: Sat, 6 Apr 2024 15:41:03 +0200 Subject: [PATCH 08/11] fix comparaison --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index e7c92f9..679b7c0 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -104,7 +104,7 @@ chown $app:$app "$install_dir/config.local.php" ynh_replace_string --match_string="//require '$data_dir/data/config.local.user.php';" --replace_string="require '$data_dir/data/config.local.user.php';" --target_file="$install_dir/config.local.php" -if ynh_compare_current_package_version --comparison le 1.3.6~ynh2; then +if ynh_compare_current_package_version --comparison le --version 1.3.6~ynh2; then ynh_script_progression --message="keep old user configuration file..." --weight=5 mv "$data_dir/data/config.local.user.php" "$data_dir/data/config.local.user.php.old" ynh_add_config --template="config.local.user.php" --destination="$data_dir/data/config.local.user.php" From fb3c9446d17f2e31693b75caae7300324c16fffc Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 6 Apr 2024 14:26:22 +0000 Subject: [PATCH 09/11] Auto-update READMEs --- ALL_README.md | 1 - README.md | 2 -- README_fr.md | 1 - README_gl.md | 1 - 4 files changed, 5 deletions(-) diff --git a/ALL_README.md b/ALL_README.md index 5f6a45c..77b7509 100644 --- a/ALL_README.md +++ b/ALL_README.md @@ -4,4 +4,3 @@ - [Irakurri README euskaraz](README_eu.md) - [Lire le README en français](README_fr.md) - [Le o README en galego](README_gl.md) - diff --git a/README.md b/README.md index aa3320f..d25db0f 100644 --- a/README.md +++ b/README.md @@ -9,10 +9,8 @@ It shall NOT be edited by hand. [![Install Paheko with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=paheko) - *[Read this README in other languages.](./ALL_README.md)* - > *This package allows you to install Paheko quickly and simply on a YunoHost server.* > *If you don't have YunoHost, please consult [the guide](https://yunohost.org/install) to learn how to install it.* diff --git a/README_fr.md b/README_fr.md index 2e82df1..55ff871 100644 --- a/README_fr.md +++ b/README_fr.md @@ -21,7 +21,6 @@ Paheko (mot de la langue Māori qui signifie « coopérer », illustrant le but **Version incluse :** 1.3.6~ynh3 - **Démo :** ## Captures d’écran diff --git a/README_gl.md b/README_gl.md index 15e0aa1..5ce45ef 100644 --- a/README_gl.md +++ b/README_gl.md @@ -21,7 +21,6 @@ Paheko (a word from the Māori language meaning "to cooperate", illustrating the **Versión proporcionada:** 1.3.6~ynh3 - **Demo:** ## Capturas de pantalla From 086c88946b22f4d47137c1e49896451540c0bf0d Mon Sep 17 00:00:00 2001 From: rodinux Date: Sat, 6 Apr 2024 16:58:24 +0200 Subject: [PATCH 10/11] fix comparaison --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 679b7c0..5ced5b9 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -104,7 +104,7 @@ chown $app:$app "$install_dir/config.local.php" ynh_replace_string --match_string="//require '$data_dir/data/config.local.user.php';" --replace_string="require '$data_dir/data/config.local.user.php';" --target_file="$install_dir/config.local.php" -if ynh_compare_current_package_version --comparison le --version 1.3.6~ynh2; then +if ynh_compare_current_package_version --comparison le --version 1.3.6~ynh2 && [ ! -f "$data_dir/data/config.local.user.php" ]; then ynh_script_progression --message="keep old user configuration file..." --weight=5 mv "$data_dir/data/config.local.user.php" "$data_dir/data/config.local.user.php.old" ynh_add_config --template="config.local.user.php" --destination="$data_dir/data/config.local.user.php" From 650764042c756e4600df204b7c9bd546bba02eb1 Mon Sep 17 00:00:00 2001 From: rodinux Date: Sat, 6 Apr 2024 17:40:39 +0200 Subject: [PATCH 11/11] fix comparaison --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 5ced5b9..a087074 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -104,7 +104,7 @@ chown $app:$app "$install_dir/config.local.php" ynh_replace_string --match_string="//require '$data_dir/data/config.local.user.php';" --replace_string="require '$data_dir/data/config.local.user.php';" --target_file="$install_dir/config.local.php" -if ynh_compare_current_package_version --comparison le --version 1.3.6~ynh2 && [ ! -f "$data_dir/data/config.local.user.php" ]; then +if ynh_compare_current_package_version --comparison le --version 1.3.6~ynh2 && ynh_compare_current_package_version --comparison ge --version 1.3.0~ynh1; then ynh_script_progression --message="keep old user configuration file..." --weight=5 mv "$data_dir/data/config.local.user.php" "$data_dir/data/config.local.user.php.old" ynh_add_config --template="config.local.user.php" --destination="$data_dir/data/config.local.user.php"