From 32de23aa83e67cbb5060b64043eda44647cf2d95 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 21 Sep 2021 23:46:54 +0200 Subject: [PATCH 1/6] cleaning up --- manifest.json | 3 +-- scripts/restore | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/manifest.json b/manifest.json index 423fd18..93fb3cd 100644 --- a/manifest.json +++ b/manifest.json @@ -28,8 +28,7 @@ "install" : [ { "name": "domain", - "type": "domain", - "example": "domain.org" + "type": "domain" }, { "name": "path", diff --git a/scripts/restore b/scripts/restore index b48aedb..bd44594 100644 --- a/scripts/restore +++ b/scripts/restore @@ -37,8 +37,6 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= ynh_script_progression --message="Validating restoration parameters..." -ynh_webpath_available --domain=$domain --path_url=$path_url \ - || ynh_die --message="Path not available: ${domain}${path_url}" test ! -d $final_path \ || ynh_die --message="There is already a directory: $final_path " From f8ca4fc925a0c12e5ff7c6fcc49527bf00362cfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 20 May 2022 23:59:20 +0200 Subject: [PATCH 2/6] Cleaning up (#66) * Fix * Auto-update README Co-authored-by: yunohost-bot --- README.md | 60 ++++----- README_fr.md | 56 +++------ YEP.md | 117 ------------------ check_process | 18 +-- conf/nginx.conf | 5 - conf/systemd.service | 2 +- ...ig_panel.toml => config_panel.toml.example | 0 doc/DESCRIPTION.md | 2 + doc/DESCRIPTION_fr.md | 2 + doc/DISCLAIMER.md | 4 + doc/DISCLAIMER_fr.md | 4 + manifest.json | 9 +- 12 files changed, 64 insertions(+), 215 deletions(-) delete mode 100644 YEP.md rename config_panel.toml => config_panel.toml.example (100%) create mode 100644 doc/DESCRIPTION.md create mode 100644 doc/DESCRIPTION_fr.md create mode 100644 doc/DISCLAIMER.md create mode 100644 doc/DISCLAIMER_fr.md diff --git a/README.md b/README.md index ed14a4a..1c2f376 100644 --- a/README.md +++ b/README.md @@ -1,67 +1,51 @@ + + # Lutim for YunoHost -[![Integration level](https://dash.yunohost.org/integration/lutim.svg)](https://dash.yunohost.org/appci/app/lutim) ![](https://ci-apps.yunohost.org/ci/badges/lutim.status.svg) [![](https://ci-apps.yunohost.org/ci/badges/lutim.maintain.svg)](https://github.com/YunoHost/Apps/#what-to-do-if-i-cant-maintain-my-app-anymore-) +[![Integration level](https://dash.yunohost.org/integration/lutim.svg)](https://dash.yunohost.org/appci/app/lutim) ![](https://ci-apps.yunohost.org/ci/badges/lutim.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/lutim.maintain.svg) [![Install Lutim with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=lutim) *[Lire ce readme en français.](./README_fr.md)* -> *This package allow you to install Lutim quickly and simply on a YunoHost server. -If you don't have YunoHost, please see [here](https://yunohost.org/install) to know how to install and enjoy it.* +> *This package allows you to install Lutim 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 Lutim stores images and allows you to see them, download them or share them on social networks. Images are indefinitely stored unless you request that they will be deleted at first view or after 24 hours / one week / one month / one year. -**Shipped version:** 0.12.1 +**Shipped version:** 0.12.1~ynh3 -## Screenshots +**Demo:** https://lut.im/ -## Demo - -* [Official instance](https://lut.im/) +## Disclaimers / important information ## Configuration Edit the file `/var/www/lutim/lutim.conf` to configure Lutim. Then reload the lutim service. -## Documentation +## Documentation and resources - * Official documentation: https://framagit.org/luc/lutim/wikis/home - * YunoHost documentation: https://yunohost.org/app_lutim +* Official app website: https://lut.im +* Official user documentation: https://framagit.org/luc/lutim/wikis/home +* Upstream app code repository: https://framagit.org/fiat-tux/hat-softwares/lutim +* YunoHost documentation for this app: https://yunohost.org/app_lutim +* Report a bug: https://github.com/YunoHost-Apps/lutim_ynh/issues -## YunoHost specific features +## Developer info -#### Multi-users support - -Not relevant. - -#### Supported architectures - -* x86-64 - [![](https://ci-apps.yunohost.org/ci/logs/lutim.svg)](https://ci-apps.yunohost.org/ci/apps/lutim/) -* ARMv8-A - [![](https://ci-apps-arm.yunohost.org/ci/logs/lutim.svg)](https://ci-apps-arm.yunohost.org/ci/apps/lutim/) - -## Limitations - -## Additionnal informations - -## Links - - * Report a bug: https://github.com/YunoHost-Apps/lutim_ynh/issues - * Lutim website: https://lut.im/ - * Dépôt de Lutim: https://framagit.org/fiat-tux/hat-softwares/lutim - * YunoHost website: https://yunohost.org/ - ---- - -## Developers infos - -Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/lutim_ynh/tree/testing). +Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/lutim_ynh/tree/testing). To try the testing branch, please proceed like that. ``` -sudo yunohost app install https://github.com/YunoHost-Apps/lutim_ynh/tree/testing --force --debug +sudo yunohost app install https://github.com/YunoHost-Apps/lutim_ynh/tree/testing --debug or sudo yunohost app upgrade lutim -u https://github.com/YunoHost-Apps/lutim_ynh/tree/testing --debug ``` + +**More info regarding app packaging:** https://yunohost.org/packaging_apps \ No newline at end of file diff --git a/README_fr.md b/README_fr.md index ba4340e..212c6dd 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,67 +1,47 @@ # Lutim pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/lutim.svg)](https://dash.yunohost.org/appci/app/lutim) ![](https://ci-apps.yunohost.org/ci/badges/lutim.status.svg) [![](https://ci-apps.yunohost.org/ci/badges/lutim.maintain.svg)](https://github.com/YunoHost/Apps/#what-to-do-if-i-cant-maintain-my-app-anymore-) +[![Niveau d'intégration](https://dash.yunohost.org/integration/lutim.svg)](https://dash.yunohost.org/appci/app/lutim) ![](https://ci-apps.yunohost.org/ci/badges/lutim.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/lutim.maintain.svg) [![Installer Lutim avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=lutim) *[Read this readme in english.](./README.md)* +*[Lire ce readme en français.](./README_fr.md)* -> *Ce package vous permet d'installer Lutim rapidement et simplement sur un serveur YunoHost. -Si vous n'avez pas YunoHost, merci de regarder [ici](https://yunohost.org/install_fr) pour savoir comment l'installer et en profiter.* +> *Ce package vous permet d'installer Lutim 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 Lutim stocke les images et vous permet de les voir, de les télécharger ou de les partager sur les réseaux sociaux. Les images sont stockées indéfiniment à moins que vous ne demandiez qu'elles soient effacées à la première vue ou après 24 heures / une semaine / un mois / un an. -**Version embarquée :** 0.12.1 +**Version incluse :** 0.12.1~ynh3 -## Captures d'écran +**Démo :** https://lut.im/ -## Démo - -* [Instance officielle](https://lut.im/) +## Avertissements / informations importantes ## Configuration Éditez le fichier `/var/www/lutim/lutim.conf` pour configurer Lutim. Rechargez ensuite le service Lutim. -## Documentation +## Documentations et ressources - * Documentation officielle : https://framagit.org/luc/lutim/wikis/home - * Documentation YunoHost : https://yunohost.org/app_lutim +* Site officiel de l'app : https://lut.im +* Documentation officielle utilisateur : https://framagit.org/luc/lutim/wikis/home +* Dépôt de code officiel de l'app : https://framagit.org/fiat-tux/hat-softwares/lutim +* Documentation YunoHost pour cette app : https://yunohost.org/app_lutim +* Signaler un bug : https://github.com/YunoHost-Apps/lutim_ynh/issues -## Fonctionnalités spécifiques à YunoHost - -#### Support multi-utilisateurs - -Non applicable. - -#### Architectures supportées. - -* x86-64 - [![](https://ci-apps.yunohost.org/ci/logs/lutim.svg)](https://ci-apps.yunohost.org/ci/apps/lutim/) -* ARMv8-A - [![](https://ci-apps-arm.yunohost.org/ci/logs/lutim.svg)](https://ci-apps-arm.yunohost.org/ci/apps/lutim/) - -## Limitations - -## Informations additionnelles - -## Liens - - * Reporter un bug : https://github.com/YunoHost-Apps/lutim_ynh/issues - * Site de Lutim : https://lut.im/ - * Dépôt de Lutim : https://framagit.org/fiat-tux/hat-softwares/lutim - * Site de YunoHost : https://yunohost.org/ - ---- - -## Informations à l'intention des développeurs +## Informations pour les développeurs Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/lutim_ynh/tree/testing). -Pour tester la branche testing, merci de procéder ainsi. +Pour essayer la branche testing, procédez comme suit. ``` -sudo yunohost app install https://github.com/YunoHost-Apps/lutim_ynh/tree/testing --force --debug +sudo yunohost app install https://github.com/YunoHost-Apps/lutim_ynh/tree/testing --debug ou sudo yunohost app upgrade lutim -u https://github.com/YunoHost-Apps/lutim_ynh/tree/testing --debug ``` + +**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps \ No newline at end of file diff --git a/YEP.md b/YEP.md deleted file mode 100644 index eca840d..0000000 --- a/YEP.md +++ /dev/null @@ -1,117 +0,0 @@ -#### [Level 0](https://github.com/YunoHost/doc/blob/master/packaging_apps_levels_fr.md#niveau-0) -[YEP 1.1 - Nommer son app et son dépot](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-11) -`Validated` -[YEP 1.2 - Inscrire l'app sur un "répertoire" connu](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-12) -`Validated` - -#### [Level 1](https://github.com/YunoHost/doc/blob/master/packaging_apps_levels_fr.md#niveau-1) -[YEP 2.2 - Utiliser bash pour les scripts principaux](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-22) -`Validated` -[YEP 2.5 - Copier correctement des fichiers](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-25) -`Don't know` -[YEP 2.7 - Donner des permissions suffisantes aux instructions bash](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-27) -`Validated` -[YEP 2.15 - Suivre les instructions d'installation de l'application](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-215) -`Validated` - -#### [Level 2](https://github.com/YunoHost/doc/blob/master/packaging_apps_levels_fr.md#niveau-2) -[YEP 1.5 - Mettre à jour régulièrement le statut de l'app](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-11) -`Validated` -[YEP 2.18.2 - Gérer l'installation à la racine d’un nom de domaine](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-2182) -`Validated` - *Automatically verified.* -[YEP 2.18.3 - Gérer l'installation sur un sous-domaine](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-2183) -`Validated` - *Automatically verified.* -[YEP 2.18.4 - Gérer l'installation sur un chemin /path](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-2184) -`Validated` - *Automatically verified.* -[YEP 4.6 - Gère le multi-instance](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-11) -`Not applicable` - *Automatically verified.* - -#### [Level 3](https://github.com/YunoHost/doc/blob/master/packaging_apps_levels_fr.md#niveau-3) -[YEP 2.3 - Sauvegarder les réponses lors de l'installation](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-23) -`Validated` - -#### [Level 4](https://github.com/YunoHost/doc/blob/master/packaging_apps_levels_fr.md#niveau-4) -[YEP 4.1 - Lier au ldap](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-41) -`Not applicable` -[YEP 4.2 - Lier l'authentification au sso](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-42) -`Not applicable` - -#### [Level 5](https://github.com/YunoHost/doc/blob/master/packaging_apps_levels_fr.md#niveau-5) -[YEP 1.3 - Indiquer la licence associée au paquet](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-13) -`Validated` -[YEP 2.1 - Respecter le format du manifeste](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-21) -`Validated` - *Automatically verified.* -[YEP 2.12 - Utiliser les commandes pratiques (helpers)](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-212) -`Validated` -[YEP 2.18.1 - Lancer le script d'installation d'une webapp correctement](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-2181) -`Not applicable` - -#### [Level 6](https://github.com/YunoHost/doc/blob/master/packaging_apps_levels_fr.md#niveau-6) -[YEP 1.4 - Informer sur l'intention de maintenir un paquet](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-14) -`Validated` -[YEP 1.6 - Se tenir informé sur l'évolution du packaging d'apps](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-16) -`Validated` -[YEP 1.7 - Ajouter l'app à l'organisation YunoHost-Apps](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-17) -`Validated` - *Automatically verified.* -[YEP 1.8 - Publier des demandes de test](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-18) -`Validated` -[YEP 1.9 - Documenter l'app](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-19) -`Validated` -[YEP 1.10 - Garder un historique de version propre](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-110) -`Don't know` -[YEP 2.9 - Enlever toutes traces de l'app lors de la suppression](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-29) -`Validated` -[YEP 3.3 - Faciliter le contrôle de l'intégrité des sources](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-33) -`Validated` -[YEP 3.5 - Suivre les recommendations de la documentation de l'app](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-35) -`Validated` -[YEP 3.6 - Mettre à jour les versions contenant des CVE](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-36) -`Validated` -[YEP 4.3 - Fournir un script de sauvegarde YunoHost fonctionnel](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-43) -`Validated` - *Automatically verified.* -[YEP 4.4 - Fournir un script de restauration YunoHost fonctionnel](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-44) -`Validated` - *Automatically verified.* - -#### [Level 7](https://github.com/YunoHost/doc/blob/master/packaging_apps_levels_fr.md#niveau-7) -[YEP 2.6 - Annuler l'action si les valeurs d'entrées sont incorrectes](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-26) -`Validated` -[YEP 3.2 - Ouvrir un port correctement](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-32) -`Validated` - -#### [Level 8](https://github.com/YunoHost/doc/blob/master/packaging_apps_levels_fr.md#niveau-8) -[YEP 2.4 - Détecter et gérer les erreurs](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-24) -`Validated` -[YEP 2.8 - Modifier correctement une configuration système](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-28) -`Validated` -[YEP 2.16 - Vérifier la disponibilité des dépendances sur ARM, x86 et x64](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-216) -`Not yet validated` - *Automatically verified.* -[YEP 2.18.5 - Gérer la tuile YunoHost pour faciliter la navigation entre les applications](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-2185) -`Validated` -[YEP 3.4 - Isoler l'app](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-34) -`Partially validated` -[YEP 4.5 - Utiliser les hooks](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-45) -`Not applicable` - -#### [Level 9](https://github.com/YunoHost/doc/blob/master/packaging_apps_levels_fr.md#niveau-9) -[YEP 2.10 - Configurer les logs de l'application](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-210) -`Validated` -[YEP 2.11 - Utiliser une variable plutôt que l'app id directement](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-211) -`Validated` -[YEP 2.13 - Traduire le paquet en anglais](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-213) -`Not yet validated` -[YEP 2.14 - Remplir correctement un fichier de conf](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-214) -`Not yet validated` -[YEP 2.17 - Prendre en compte la version d'origine lors des mises à jour](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-217) -`Validated` -[YEP 4.2.1 - Déconnexion](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-421) -`Don't know` - -#### Other YEP -[YEP 3.1 - Ne pas demander ou stocker de mot de passe LDAP](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-31) -`Validated` -[YEP 4.7 - Ajouter un module à la CLI](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-47) -`Not applicable` -[YEP 4.8 - Ajouter un module à l'admin web](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-48) -`Not applicable` - -State of each YEP can be one of these: `Validated`, `Partially validated`, `Not yet validated`, `Not applicable`, `Don't know`. diff --git a/check_process b/check_process index f241055..0efbeae 100644 --- a/check_process +++ b/check_process @@ -1,18 +1,9 @@ ;; Test complet ; Manifest - domain="domain.tld" (DOMAIN) - path="/path" (PATH) - is_public=1 (PUBLIC|public=1|private=0) + domain="domain.tld" + path="/path" + is_public=1 always_encrypt=1 - ; Actions - ; Config_panel - main.configuration.always_encrypt=0|1 - main.configuration.antiflood=10 - main.configuration.delay=None|Day|Week|Month|Year - main.overwrite_files.overwrite_settings=0|1 - main.overwrite_files.overwrite_nginx=0|1 - main.overwrite_files.overwrite_systemd=0|1 - main.global_config.email_type=0|1 ; Checks pkg_linter=1 setup_sub_dir=1 @@ -24,10 +15,7 @@ upgrade=1 from_commit=ec8858ed0d054049a0c8f46c6126ee8ae0798e8f backup_restore=1 multi_instance=0 - port_already_use=1 (8095) change_url=1 - actions=0 - config_panel=1 ;;; Options Email= Notification=change diff --git a/conf/nginx.conf b/conf/nginx.conf index 4f77ee9..ddb6433 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,10 +1,5 @@ location __PATH__ { - # Force usage of https - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } - # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; diff --git a/conf/systemd.service b/conf/systemd.service index 9e9b08b..23707fa 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -1,5 +1,5 @@ [Unit] -Description=Image hosting and sharing service +Description=Lutim: Image hosting and sharing service After=network.target [Service] diff --git a/config_panel.toml b/config_panel.toml.example similarity index 100% rename from config_panel.toml rename to config_panel.toml.example diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md new file mode 100644 index 0000000..d50201b --- /dev/null +++ b/doc/DESCRIPTION.md @@ -0,0 +1,2 @@ +Lutim stores images and allows you to see them, download them or share them on social networks. +Images are indefinitely stored unless you request that they will be deleted at first view or after 24 hours / one week / one month / one year. \ No newline at end of file diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md new file mode 100644 index 0000000..b02418d --- /dev/null +++ b/doc/DESCRIPTION_fr.md @@ -0,0 +1,2 @@ +Lutim stocke les images et vous permet de les voir, de les télécharger ou de les partager sur les réseaux sociaux. +Les images sont stockées indéfiniment à moins que vous ne demandiez qu'elles soient effacées à la première vue ou après 24 heures / une semaine / un mois / un an. \ No newline at end of file diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md new file mode 100644 index 0000000..626ac96 --- /dev/null +++ b/doc/DISCLAIMER.md @@ -0,0 +1,4 @@ +## Configuration + +Edit the file `/var/www/lutim/lutim.conf` to configure Lutim. +Then reload the lutim service. diff --git a/doc/DISCLAIMER_fr.md b/doc/DISCLAIMER_fr.md new file mode 100644 index 0000000..3003f70 --- /dev/null +++ b/doc/DISCLAIMER_fr.md @@ -0,0 +1,4 @@ +## Configuration + +Éditez le fichier `/var/www/lutim/lutim.conf` pour configurer Lutim. +Rechargez ensuite le service Lutim. diff --git a/manifest.json b/manifest.json index 93fb3cd..89e0c20 100644 --- a/manifest.json +++ b/manifest.json @@ -8,6 +8,13 @@ }, "version": "0.12.1~ynh3", "url": "https://lut.im", + "upstream": { + "license": "AGPL-3.0-only", + "website": "https://lut.im", + "demo": "https://lut.im/", + "userdoc": "https://framagit.org/luc/lutim/wikis/home", + "code": "https://framagit.org/fiat-tux/hat-softwares/lutim" + }, "license": "AGPL-3.0-only", "maintainer": { "name": "", @@ -18,7 +25,7 @@ "email": "maniackc_dev@crudelis.fr" }], "requirements": { - "yunohost": ">= 4.2.0" + "yunohost": ">= 4.3.0" }, "multi_instance": false, "services": [ From 2d010b1fc426f07738ae6b3d0046d6d48c69dfac Mon Sep 17 00:00:00 2001 From: yalh76 Date: Fri, 17 Jun 2022 00:04:13 +0200 Subject: [PATCH 3/6] Apply example_ynh --- check_process | 43 +++++++++++++++++----------------- conf/nginx.conf | 35 ++++++++++++++-------------- manifest.json | 4 ++-- scripts/change_url | 20 +++++++++++----- scripts/install | 14 ++++++----- scripts/remove | 16 ++++++------- scripts/restore | 43 ++++++++++++++++------------------ scripts/upgrade | 58 +++++++++++++++++++++++++--------------------- 8 files changed, 124 insertions(+), 109 deletions(-) diff --git a/check_process b/check_process index 0efbeae..56ff100 100644 --- a/check_process +++ b/check_process @@ -1,25 +1,26 @@ ;; Test complet - ; Manifest - domain="domain.tld" - path="/path" - is_public=1 - always_encrypt=1 - ; Checks - pkg_linter=1 - setup_sub_dir=1 - setup_root=1 - setup_nourl=0 - setup_private=1 - setup_public=1 - upgrade=1 - upgrade=1 from_commit=ec8858ed0d054049a0c8f46c6126ee8ae0798e8f - backup_restore=1 - multi_instance=0 - change_url=1 + ; Manifest + domain="domain.tld" + path="/path" + is_public=1 + always_encrypt=1 + ; Checks + pkg_linter=1 + setup_sub_dir=1 + setup_root=1 + setup_nourl=0 + setup_private=1 + setup_public=1 + upgrade=1 + upgrade=1 from_commit=ec8858ed0d054049a0c8f46c6126ee8ae0798e8f + backup_restore=1 + multi_instance=0 + port_already_use=0 + change_url=1 ;;; Options Email= -Notification=change +Notification=none ;;; Upgrade options - ; commit=ec8858ed0d054049a0c8f46c6126ee8ae0798e8f - name=22 May 2020 ec8858ed0d054049a0c8f46c6126ee8ae0798e8f - manifest_arg=domain=DOMAIN&path=PATH&admin=USER&is_public=1&always_encrypt=1& + ; commit=ec8858ed0d054049a0c8f46c6126ee8ae0798e8f + name=22 May 2020 ec8858ed0d054049a0c8f46c6126ee8ae0798e8f + manifest_arg=domain=DOMAIN&path=PATH&admin=USER&is_public=1&always_encrypt=1& diff --git a/conf/nginx.conf b/conf/nginx.conf index ddb6433..864e14e 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,25 +1,26 @@ -location __PATH__ { +#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; +location __PATH__/ { - # Include SSOWAT user panel. - include conf.d/yunohost_panel.conf.inc; + # This is important for user's privacy ! + access_log off; + error_log /var/log/nginx/lutim.error.log; - # This is important for user's privacy ! - access_log off; - error_log /var/log/nginx/lutim.error.log; + # This is important ! Make it OK with your Lutim configuration + client_max_body_size 40M; - # This is important ! Make it OK with your Lutim configuration - client_max_body_size 40M; + proxy_pass http://127.0.0.1:__PORT__; - proxy_pass http://127.0.0.1:__PORT__; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + # Lutim reads this header and understands that the current session is actually HTTPS. + # Enable it if you run a HTTPS server (in this case, don't forgot to change the listen port + proxy_set_header X-Forwarded-Proto https; - # Lutim reads this header and understands that the current session is actually HTTPS. - # Enable it if you run a HTTPS server (in this case, don't forgot to change the listen port - proxy_set_header X-Forwarded-Proto https; + # We expect the downsteam servers to redirect to the right hostname, so don't do any rewrite + proxy_redirect off; - # We expect the downsteam servers to redirect to the right hostname, so don't do any rewrite - proxy_redirect off; + # Include SSOWAT user panel. + include conf.d/yunohost_panel.conf.inc; } diff --git a/manifest.json b/manifest.json index 89e0c20..8c4db3b 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Anonymous image hosting service", "fr": "Service d'hébergement anonyme d'images" }, - "version": "0.12.1~ynh3", + "version": "0.12.1~ynh4", "url": "https://lut.im", "upstream": { "license": "AGPL-3.0-only", @@ -32,7 +32,7 @@ "nginx" ], "arguments": { - "install" : [ + "install": [ { "name": "domain", "type": "domain" diff --git a/scripts/change_url b/scripts/change_url index 88e8689..21ffdb3 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -28,6 +28,8 @@ ynh_script_progression --message="Loading installation settings..." --weight=2 # Needed for helper "ynh_add_nginx_config" final_path=$(ynh_app_setting_get --app=$app --key=final_path) + +# Add settings here as needed by your application is_public=$(ynh_app_setting_get --app=$app --key=is_public) port=$(ynh_app_setting_get --app=$app --key=port) @@ -39,8 +41,7 @@ ynh_script_progression --message="Backing up the app before changing its URL (ma # Backup the current version of the app ynh_backup_before_upgrade ynh_clean_setup () { - ynh_clean_check_starting - + ynh_clean_check_starting # Remove the new domain config file, the remove script won't do it as it doesn't know yet its location. ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" @@ -77,6 +78,13 @@ fi #================================================= # STANDARD MODIFICATIONS +#================================================= +# STOP SYSTEMD SERVICE +#================================================= +ynh_script_progression --message="Stopping a systemd service..." + +ynh_systemd_action --service_name=$app --action="stop" + #================================================= # MODIFY URL IN NGINX CONF #================================================= @@ -134,12 +142,12 @@ ynh_replace_string --match_string="\(^ *prefix.*=> '\).*" --replace_string="\1$n #================================================= # GENERIC FINALISATION #================================================= -# START AND CHECK LUTIM BOOTING +# START SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Restarting Lutim..." --weight=3 +ynh_script_progression --message="Starting a systemd service..." --weight=3 -# Wait for lutim to be fully started -ynh_systemd_action --action=restart --line_match="Manager.*started" --log_path="/var/log/$app/production.log" --timeout="120" +# Start a systemd service +ynh_systemd_action --service_name=$app --action="start" --line_match="Manager.*started" --log_path="/var/log/$app/production.log" --timeout="120" #================================================= # RELOAD NGINX diff --git a/scripts/install b/scripts/install index 36abedf..e47c9e2 100644 --- a/scripts/install +++ b/scripts/install @@ -14,8 +14,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_clean_setup () { -# Clean installation remaining that are not handle by the remove script. - ynh_clean_check_starting + ynh_clean_check_starting } # Exit if an error occurs during the execution of the script ynh_abort_if_errors @@ -31,6 +30,8 @@ always_encrypt=$YNH_APP_ARG_ALWAYS_ENCRYPT app=$YNH_APP_INSTANCE_NAME +secret=$(ynh_string_random) + #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS #================================================= @@ -51,6 +52,7 @@ 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=always_encrypt --value=$always_encrypt +ynh_app_setting_set --app=$app --key=secret --value="$secret" ynh_app_setting_set --app=$app --key=overwrite_settings --value=1 ynh_app_setting_set --app=$app --key=overwrite_nginx --value=1 @@ -81,7 +83,7 @@ ynh_install_app_dependencies $pkg_dependencies ynh_script_progression --message="Configuring system user..." --weight=2 # Create a system user -ynh_system_user_create --username=$app --home_dir=$final_path +ynh_system_user_create --username=$app --home_dir="$final_path" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -117,9 +119,9 @@ ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --targ ynh_replace_string --match_string="__PATH__" --replace_string="$path_url" --target_file="$final_path/lutim.conf" ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$final_path/lutim.conf" ynh_replace_string --match_string="__ENCRYPT__" --replace_string="$always_encrypt" --target_file="$final_path/lutim.conf" -secret=$(ynh_string_random) + ynh_replace_string --match_string="__SECRET__" --replace_string="$secret" --target_file="$final_path/lutim.conf" -ynh_app_setting_set --app=$app --key=secret --value="$secret" + # Set the number of process for Lutim to twice the number of CPU core. ynh_replace_string --match_string="__WORKERS__" --replace_string="$(( $(nproc) * 2 ))" --target_file="$final_path/lutim.conf" # Calculate and store the config file checksum into the app settings @@ -174,7 +176,7 @@ chown $app -R /var/log/$app ln -s /var/log/$app/production.log "$final_path/log/production.log" #================================================= -# GENERIC FINALISATION +# GENERIC FINALIZATION #================================================= # SETUP LOGROTATE #================================================= diff --git a/scripts/remove b/scripts/remove index 06b5b89..9deea7b 100644 --- a/scripts/remove +++ b/scripts/remove @@ -41,12 +41,12 @@ ynh_script_progression --message="Stopping and removing the systemd service..." ynh_remove_systemd_config #================================================= -# REMOVE DEPENDENCIES +# REMOVE LOGROTATE CONFIGURATION #================================================= -ynh_script_progression --message="Removing dependencies..." --weight=20 +ynh_script_progression --message="Removing logrotate configuration..." -# Remove metapackage and its dependencies -ynh_remove_app_dependencies +# Remove the app-specific logrotate config +ynh_remove_logrotate #================================================= # REMOVE APP MAIN DIR @@ -65,12 +65,12 @@ ynh_script_progression --message="Removing NGINX web server configuration..." ynh_remove_nginx_config #================================================= -# REMOVE LOGROTATE CONFIGURATION +# REMOVE DEPENDENCIES #================================================= -ynh_script_progression --message="Removing logrotate configuration..." +ynh_script_progression --message="Removing dependencies..." --weight=20 -# Remove the app-specific logrotate config -ynh_remove_logrotate +# Remove metapackage and its dependencies +ynh_remove_app_dependencies #================================================= # SPECIFIC REMOVE diff --git a/scripts/restore b/scripts/restore index bd44594..5714c5b 100644 --- a/scripts/restore +++ b/scripts/restore @@ -15,8 +15,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_clean_setup () { -# Clean installation remaining that are not handle by the remove script. - ynh_clean_check_starting + ynh_clean_check_starting } # Exit if an error occurs during the execution of the script ynh_abort_if_errors @@ -49,20 +48,13 @@ ynh_maintenance_mode_ON #================================================= # STANDARD RESTORATION STEPS -#================================================= -# RESTORE THE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the NGINX configuration..." - -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" - #================================================= # RECREATE THE DEDICATED USER #================================================= ynh_script_progression --message="Recreating the dedicated system user..." --weight=2 # Create the dedicated user (if not existing) -ynh_system_user_create --username=$app --home_dir=$final_path +ynh_system_user_create --username=$app --home_dir="$final_path" #================================================= # RESTORE THE APP MAIN DIR @@ -82,18 +74,23 @@ chown -R $app:$app "$final_path" #================================================= ynh_script_progression --message="Reinstalling dependencies..." --weight=60 +# Define and install dependencies ynh_install_app_dependencies $pkg_dependencies #================================================= -# RESTORE THE CRON FILE +# RESTORE THE NGINX CONFIGURATION #================================================= +ynh_script_progression --message="Restoring the NGINX configuration..." + +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" + +#================================================= +# RESTORE VARIOUS FILES +#================================================= +ynh_script_progression --message="Restoring various files..." ynh_restore_file --origin_path="/etc/cron.d/$app" -#================================================= -# SETUP LOG FILE -#================================================= - # Making log a symbolic link to /var/log mkdir -p /var/log/$app/ touch /var/log/$app/production.log @@ -107,10 +104,18 @@ ynh_script_progression --message="Restoring the systemd configuration..." ynh_restore_file --origin_path="/etc/systemd/system/$app.service" systemctl enable $app.service --quiet +#================================================= +# RESTORE THE LOGROTATE CONFIGURATION +#================================================= +ynh_script_progression --message="Restoring the logrotate configuration..." + +ynh_restore_file --origin_path="/etc/logrotate.d/$app" + #================================================= # INTEGRATE SERVICE IN YUNOHOST #================================================= ynh_script_progression --message="Integrating service in YunoHost..." + yunohost service add $app --log="$final_path/log/production.log" #================================================= @@ -118,16 +123,8 @@ yunohost service add $app --log="$final_path/log/production.log" #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=3 -# Wait for lutim to be fully started ynh_systemd_action --action=restart --line_match="Manager.*started" --log_path="/var/log/$app/production.log" --timeout="120" -#================================================= -# RESTORE THE LOGROTATE CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the logrotate configuration..." - -ynh_restore_file --origin_path="/etc/logrotate.d/$app" - #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 7d9edc8..6b11d4e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -48,10 +48,9 @@ ynh_script_progression --message="Backing up the app before upgrading (may take # Backup the current version of the app ynh_backup_before_upgrade ynh_clean_setup () { -# Clean installation remaining that are not handle by the remove script. - ynh_clean_check_starting - # restore it if the upgrade fails - ynh_restore_upgradebackup + ynh_clean_check_starting + # Restore it if the upgrade fails + ynh_restore_upgradebackup } # Exit if an error occurs during the execution of the script ynh_abort_if_errors @@ -65,6 +64,13 @@ ynh_maintenance_mode_ON #================================================= # STANDARD UPGRADE STEPS +#================================================= +# STOP SYSTEMD SERVICE +#================================================= +ynh_script_progression --message="Stopping a systemd service..." + +ynh_systemd_action --service_name=$app --action="stop" + #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= @@ -165,7 +171,7 @@ ynh_app_setting_set --app=$app --key=unprotected_uris --value="/" ynh_script_progression --message="Making sure dedicated system user exists..." # Create a dedicated user (if not existing) -ynh_system_user_create --username=$app --home_dir=$final_path +ynh_system_user_create --username=$app --home_dir="$final_path" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -183,6 +189,13 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" +#================================================= +# UPGRADE DEPENDENCIES +#================================================= +ynh_script_progression --message="Upgrading dependencies..." --weight=9 + +ynh_install_app_dependencies $pkg_dependencies + #================================================= # NGINX CONFIGURATION #================================================= @@ -194,13 +207,6 @@ then ynh_add_nginx_config fi -#================================================= -# UPGRADE DEPENDENCIES -#================================================= -ynh_script_progression --message="Upgrading dependencies..." --weight=9 - -ynh_install_app_dependencies $pkg_dependencies - #================================================= # SPECIFIC UPGRADE #================================================= @@ -245,17 +251,6 @@ fi ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="../hooks/post_app_addaccess" ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="../hooks/post_app_removeaccess" -#================================================= -# SETUP SYSTEMD -#================================================= - -# Overwrite the systemd configuration only if it's allowed -if [ $overwrite_systemd -eq 1 ] -then - ynh_script_progression --message="Upgrading systemd configuration..." --weight=2 - ynh_add_systemd_config -fi - #================================================= # SETUP CRON #================================================= @@ -275,6 +270,17 @@ then popd fi +#================================================= +# SETUP SYSTEMD +#================================================= + +# Overwrite the systemd configuration only if it's allowed +if [ $overwrite_systemd -eq 1 ] +then + ynh_script_progression --message="Upgrading systemd configuration..." --weight=2 + ynh_add_systemd_config +fi + #================================================= # GENERIC FINALIZATION #================================================= @@ -290,15 +296,15 @@ chown $app -R /var/log/$app # INTEGRATE SERVICE IN YUNOHOST #================================================= ynh_script_progression --message="Integrating service in YunoHost..." + yunohost service add $app --log="$final_path/log/production.log" #================================================= # START SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Starting a systemd service...." --weight=4 +ynh_script_progression --message="Starting a systemd service..." --weight=4 -# Wait for lutim to be fully started -ynh_systemd_action --action=restart --line_match="Manager.*started" --log_path="/var/log/$app/production.log" --timeout="120" +ynh_systemd_action --service_name=$app --action="start" --line_match="Manager.*started" --log_path="/var/log/$app/production.log" --timeout="120" #================================================= # RELOAD NGINX From 34f2df964ea2717774297ef0294e1760b423b996 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 16 Jun 2022 22:04:18 +0000 Subject: [PATCH 4/6] Auto-update README --- README.md | 20 ++++++++++---------- README_fr.md | 26 +++++++++++++++----------- 2 files changed, 25 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 1c2f376..6b4bcf6 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # Lutim for YunoHost -[![Integration level](https://dash.yunohost.org/integration/lutim.svg)](https://dash.yunohost.org/appci/app/lutim) ![](https://ci-apps.yunohost.org/ci/badges/lutim.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/lutim.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/lutim.svg)](https://dash.yunohost.org/appci/app/lutim) ![Working status](https://ci-apps.yunohost.org/ci/badges/lutim.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/lutim.maintain.svg) [![Install Lutim with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=lutim) *[Lire ce readme en français.](./README_fr.md)* @@ -18,10 +18,9 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Lutim stores images and allows you to see them, download them or share them on social networks. Images are indefinitely stored unless you request that they will be deleted at first view or after 24 hours / one week / one month / one year. -**Shipped version:** 0.12.1~ynh3 +**Shipped version:** 0.12.1~ynh4 **Demo:** https://lut.im/ - ## Disclaimers / important information ## Configuration @@ -31,21 +30,22 @@ Then reload the lutim service. ## Documentation and resources -* Official app website: https://lut.im -* Official user documentation: https://framagit.org/luc/lutim/wikis/home -* Upstream app code repository: https://framagit.org/fiat-tux/hat-softwares/lutim -* YunoHost documentation for this app: https://yunohost.org/app_lutim -* Report a bug: https://github.com/YunoHost-Apps/lutim_ynh/issues +* Official app website: +* Official user documentation: +* Upstream app code repository: +* YunoHost documentation for this app: +* Report a bug: ## Developer info Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/lutim_ynh/tree/testing). To try the testing branch, please proceed like that. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/lutim_ynh/tree/testing --debug or sudo yunohost app upgrade lutim -u https://github.com/YunoHost-Apps/lutim_ynh/tree/testing --debug ``` -**More info regarding app packaging:** https://yunohost.org/packaging_apps \ No newline at end of file +**More info regarding app packaging:** diff --git a/README_fr.md b/README_fr.md index 212c6dd..728ae15 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,10 +1,14 @@ + + # Lutim pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/lutim.svg)](https://dash.yunohost.org/appci/app/lutim) ![](https://ci-apps.yunohost.org/ci/badges/lutim.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/lutim.maintain.svg) +[![Niveau d'intégration](https://dash.yunohost.org/integration/lutim.svg)](https://dash.yunohost.org/appci/app/lutim) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/lutim.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/lutim.maintain.svg) [![Installer Lutim avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=lutim) *[Read this readme in english.](./README.md)* -*[Lire ce readme en français.](./README_fr.md)* > *Ce package vous permet d'installer Lutim 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.* @@ -14,10 +18,9 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Lutim stocke les images et vous permet de les voir, de les télécharger ou de les partager sur les réseaux sociaux. Les images sont stockées indéfiniment à moins que vous ne demandiez qu'elles soient effacées à la première vue ou après 24 heures / une semaine / un mois / un an. -**Version incluse :** 0.12.1~ynh3 +**Version incluse :** 0.12.1~ynh4 **Démo :** https://lut.im/ - ## Avertissements / informations importantes ## Configuration @@ -27,21 +30,22 @@ Rechargez ensuite le service Lutim. ## Documentations et ressources -* Site officiel de l'app : https://lut.im -* Documentation officielle utilisateur : https://framagit.org/luc/lutim/wikis/home -* Dépôt de code officiel de l'app : https://framagit.org/fiat-tux/hat-softwares/lutim -* Documentation YunoHost pour cette app : https://yunohost.org/app_lutim -* Signaler un bug : https://github.com/YunoHost-Apps/lutim_ynh/issues +* Site officiel de l'app : +* Documentation officielle utilisateur : +* Dépôt de code officiel de l'app : +* Documentation YunoHost pour cette app : +* Signaler un bug : ## Informations pour les développeurs Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/lutim_ynh/tree/testing). Pour essayer la branche testing, procédez comme suit. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/lutim_ynh/tree/testing --debug ou sudo yunohost app upgrade lutim -u https://github.com/YunoHost-Apps/lutim_ynh/tree/testing --debug ``` -**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps \ No newline at end of file +**Plus d'infos sur le packaging d'applications :** From 7caee7c87616b486c2a33f539fa4c0ee83e4e92a Mon Sep 17 00:00:00 2001 From: yalh76 Date: Fri, 17 Jun 2022 00:08:22 +0200 Subject: [PATCH 5/6] Apply example_ynh --- conf/app.src | 1 + conf/lutim.conf.template | 26 +++++++++++++++++++++++--- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/conf/app.src b/conf/app.src index 11db593..11900b9 100644 --- a/conf/app.src +++ b/conf/app.src @@ -4,3 +4,4 @@ SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true SOURCE_FILENAME= +SOURCE_EXTRACT=true diff --git a/conf/lutim.conf.template b/conf/lutim.conf.template index c4c6234..aeccde1 100644 --- a/conf/lutim.conf.template +++ b/conf/lutim.conf.template @@ -6,7 +6,6 @@ # see http://mojolicio.us/perldoc/Mojo/Server/Hypnotoad for a full list of settings hypnotoad => { # array of IP addresses and ports you want to listen to - #listen => ['http://127.0.0.1:8080'], listen => ['http://127.0.0.1:__PORT__'], # if you use Lutim behind a reverse proxy like Nginx, you want to set proxy to 1 # if you use Lutim directly, let it commented @@ -106,6 +105,29 @@ # optional, default is 0 always_encrypt => __ENCRYPT__, + # you can allow to use a watermark on the uploaded images (or enforce its use) + # define a path to the watermark image (provide an image with alpha channel) + # you can define the path relative to lutim directory or set an absolute path + # to disable the usage of a watermark, leave it blank or commented + # optional, no default + #watermark_path => '', + + # the watermark can be a tiling one or a single one + # when using a small one, you can choose where to place it + # valid values are 'Center', 'North', 'NorthEast', 'East', 'SouthEast', 'South', 'SouthWest', 'West' and 'NorthWest' (case insensitive) + # optional, default is 'SouthEast' + #watermark_placement => 'SouthEast', + + # choose which watermark (tiling, single or none) should be used by default + # valid values are 'tiling', 'single' or 'none' (case insensitive) + # optional, default is 'none' + #watermark_default => 'none', + + # choose which watermark (tiling, single or none) should be enforced (users will always have a watermark and won’t be able to disable it) + # valid values are 'tiling', 'single' or 'none' (case insensitive) + # optional, default is 'none' + #watermark_enforce => 'none', + # length of the image's delete token # optional, default is 24 #token_length => 24, @@ -114,7 +136,6 @@ # example: you want to have Lutim under https://example.org/lutim/ # => set prefix to '/lutim' or to '/lutim/', it doesn't matter # optional, defaut is / - #prefix => '/', prefix => '__PATH__', # choose what database you want to use @@ -284,7 +305,6 @@ # max size of the files directory, in octets # used by script/lutim cron watch to trigger an action # optional, no default - #max_total_size => 10*1024*1024*1024, # (=10 Go) max_total_size => 1024*1024*1024, # (=1 Go) # default action when files directory is over max_total_size (used with script/lutim cron watch) From 38708863058122aafaba742997db837a1cdfff5d Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 19 Jun 2022 03:03:03 +0200 Subject: [PATCH 6/6] Update lutim.conf.template --- conf/lutim.conf.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/lutim.conf.template b/conf/lutim.conf.template index aeccde1..97c9118 100644 --- a/conf/lutim.conf.template +++ b/conf/lutim.conf.template @@ -123,7 +123,7 @@ # optional, default is 'none' #watermark_default => 'none', - # choose which watermark (tiling, single or none) should be enforced (users will always have a watermark and won’t be able to disable it) + # choose which watermark (tiling, single or none) should be enforced (users will always have a watermark and won’t be able to disable it) # valid values are 'tiling', 'single' or 'none' (case insensitive) # optional, default is 'none' #watermark_enforce => 'none',