├── .github ├── ISSUE_TEMPLATE.md └── PULL_REQUEST_TEMPLATE.md ├── ALL_README.md ├── LICENSE ├── README.md ├── README_es.md ├── README_eu.md ├── README_fr.md ├── README_gl.md ├── README_id.md ├── README_it.md ├── README_nl.md ├── README_pl.md ├── README_ru.md ├── README_zh_Hans.md ├── conf ├── logrotate ├── lstu-minion@.service ├── lstu.conf ├── nginx.conf └── systemd.service ├── doc ├── ADMIN.md ├── ADMIN_fr.md ├── DESCRIPTION.md ├── DESCRIPTION_fr.md └── screenshots │ └── LSTU_screenshot.png ├── manifest.toml ├── scripts ├── _common.sh ├── backup ├── change_url ├── install ├── remove ├── restore └── upgrade └── tests.toml /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: When creating a bug report, please use the following template to provide all the relevant information and help debugging efficiently. 4 | 5 | --- 6 | 7 | **How to post a meaningful bug report** 8 | 1. *Read this whole template first.* 9 | 2. *Determine if you are on the right place:* 10 | - *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change_url...), you are on the right place!* 11 | - *Otherwise, the issue may be due to the app itself. Refer to its documentation or repository for help.* 12 | - *When in doubt, post here and we will figure it out together.* 13 | 3. *Delete the italic comments as you write over them below, and remove this guide.* 14 | --- 15 | 16 | ### Describe the bug 17 | 18 | *A clear and concise description of what the bug is.* 19 | 20 | ### Context 21 | 22 | - Hardware: *VPS bought online / Old laptop or computer / Raspberry Pi at home / Internet Cube with VPN / Other ARM board / ...* 23 | - YunoHost version: x.x.x 24 | - I have access to my server: *Through SSH | through the webadmin | direct access via keyboard / screen | ...* 25 | - Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: *no / yes* 26 | - If yes, please explain: 27 | - Using, or trying to install package version/branch: 28 | - If upgrading, current package version: *can be found in the admin, or with `yunohost app info $app_id`* 29 | 30 | ### Steps to reproduce 31 | 32 | - *If you performed a command from the CLI, the command itself is enough. For example:* 33 | ```sh 34 | sudo yunohost app install the_app 35 | ``` 36 | - *If you used the webadmin, please perform the equivalent command from the CLI first.* 37 | - *If the error occurs in your browser, explain what you did:* 38 | 1. *Go to '...'* 39 | 2. *Click on '...'* 40 | 3. *Scroll down to '...'* 41 | 4. *See error* 42 | 43 | ### Expected behavior 44 | 45 | *A clear and concise description of what you expected to happen. You can remove this section if the command above is enough to understand your intent.* 46 | 47 | ### Logs 48 | 49 | *When an operation fails, YunoHost provides a simple way to share the logs.* 50 | - *In the webadmin, the error message contains a link to the relevant log page. On that page, you will be able to 'Share with Yunopaste'. If you missed it, the logs of previous operations are also available under Tools > Logs.* 51 | - *In command line, the command to share the logs is displayed at the end of the operation and looks like `yunohost log display [log name] --share`. If you missed it, you can find the log ID of a previous operation using `yunohost log list`.* 52 | 53 | *After sharing the log, please copypaste directly the link provided by YunoHost (to help readability, no need to copypaste the entire content of the log here, just the link is enough...)* 54 | 55 | *If applicable and useful, add screenshots to help explain your problem.* 56 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## Problem 2 | 3 | - *Description of why you made this PR* 4 | 5 | ## Solution 6 | 7 | - *And how do you fix that problem* 8 | 9 | ## PR Status 10 | 11 | - [ ] Code finished and ready to be reviewed/tested 12 | - [ ] The fix/enhancement were manually tested (if applicable) 13 | 14 | ## Automatic tests 15 | 16 | Automatic tests can be triggered on https://ci-apps-dev.yunohost.org/ *after creating the PR*, by commenting "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!". (N.B. : for this to work you need to be a member of the Yunohost-Apps organization) 17 | -------------------------------------------------------------------------------- /ALL_README.md: -------------------------------------------------------------------------------- 1 | # All available README files by language 2 | 3 | - [Read the README in English](README.md) 4 | - [Lea el README en español](README_es.md) 5 | - [Irakurri README euskaraz](README_eu.md) 6 | - [Lire le README en français](README_fr.md) 7 | - [Le o README en galego](README_gl.md) 8 | - [Baca README dalam bahasa bahasa Indonesia](README_id.md) 9 | - [Lees de README in het Nederlands](README_nl.md) 10 | - [Przeczytaj README w języku polski](README_pl.md) 11 | - [Прочитать README на русский](README_ru.md) 12 | - [阅读中文(简体)的 README](README_zh_Hans.md) 13 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 2 | Version 2, December 2004 3 | 4 | Copyright (C) 2004 Sam Hocevar 5 | 6 | Everyone is permitted to copy and distribute verbatim or modified 7 | copies of this license document, and changing it is allowed as long 8 | as the name is changed. 9 | 10 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 11 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 12 | 13 | 0. You just DO WHAT THE FUCK YOU WANT TO. 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 5 | 6 | # Lstu for YunoHost 7 | 8 | [![Integration level](https://apps.yunohost.org/badge/integration/lstu)](https://ci-apps.yunohost.org/ci/apps/lstu/) 9 | ![Working status](https://apps.yunohost.org/badge/state/lstu) 10 | ![Maintenance status](https://apps.yunohost.org/badge/maintained/lstu) 11 | 12 | [![Install Lstu with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=lstu) 13 | 14 | *[Read this README in other languages.](./ALL_README.md)* 15 | 16 | > *This package allows you to install Lstu quickly and simply on a YunoHost server.* 17 | > *If you don't have YunoHost, please consult [the guide](https://yunohost.org/install) to learn how to install it.* 18 | 19 | ## Overview 20 | 21 | Lstu means Let's Shorten That URL. 22 | 23 | 24 | **Shipped version:** 0.28-0~ynh4 25 | 26 | **Demo:** 27 | 28 | ## Screenshots 29 | 30 | ![Screenshot of Lstu](./doc/screenshots/LSTU_screenshot.png) 31 | 32 | ## Documentation and resources 33 | 34 | - Official app website: 35 | - Official admin documentation: 36 | - Upstream app code repository: 37 | - YunoHost Store: 38 | - Report a bug: 39 | 40 | ## Developer info 41 | 42 | Please send your pull request to the [`testing` branch](https://github.com/YunoHost-Apps/lstu_ynh/tree/testing). 43 | 44 | To try the `testing` branch, please proceed like that: 45 | 46 | ```bash 47 | sudo yunohost app install https://github.com/YunoHost-Apps/lstu_ynh/tree/testing --debug 48 | or 49 | sudo yunohost app upgrade lstu -u https://github.com/YunoHost-Apps/lstu_ynh/tree/testing --debug 50 | ``` 51 | 52 | **More info regarding app packaging:** 53 | -------------------------------------------------------------------------------- /README_es.md: -------------------------------------------------------------------------------- 1 | 5 | 6 | # Lstu para Yunohost 7 | 8 | [![Nivel de integración](https://apps.yunohost.org/badge/integration/lstu)](https://ci-apps.yunohost.org/ci/apps/lstu/) 9 | ![Estado funcional](https://apps.yunohost.org/badge/state/lstu) 10 | ![Estado En Mantención](https://apps.yunohost.org/badge/maintained/lstu) 11 | 12 | [![Instalar Lstu con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=lstu) 13 | 14 | *[Leer este README en otros idiomas.](./ALL_README.md)* 15 | 16 | > *Este paquete le permite instalarLstu rapidamente y simplement en un servidor YunoHost.* 17 | > *Si no tiene YunoHost, visita [the guide](https://yunohost.org/install) para aprender como instalarla.* 18 | 19 | ## Descripción general 20 | 21 | Lstu means Let's Shorten That URL. 22 | 23 | 24 | **Versión actual:** 0.28-0~ynh4 25 | 26 | **Demo:** 27 | 28 | ## Capturas 29 | 30 | ![Captura de Lstu](./doc/screenshots/LSTU_screenshot.png) 31 | 32 | ## Documentaciones y recursos 33 | 34 | - Sitio web oficial: 35 | - Documentación administrador oficial: 36 | - Repositorio del código fuente oficial de la aplicación : 37 | - Catálogo YunoHost: 38 | - Reportar un error: 39 | 40 | ## Información para desarrolladores 41 | 42 | Por favor enviar sus correcciones a la [rama `testing`](https://github.com/YunoHost-Apps/lstu_ynh/tree/testing). 43 | 44 | Para probar la rama `testing`, sigue asÍ: 45 | 46 | ```bash 47 | sudo yunohost app install https://github.com/YunoHost-Apps/lstu_ynh/tree/testing --debug 48 | o 49 | sudo yunohost app upgrade lstu -u https://github.com/YunoHost-Apps/lstu_ynh/tree/testing --debug 50 | ``` 51 | 52 | **Mas informaciones sobre el empaquetado de aplicaciones:** 53 | -------------------------------------------------------------------------------- /README_eu.md: -------------------------------------------------------------------------------- 1 | 5 | 6 | # Lstu YunoHost-erako 7 | 8 | [![Integrazio maila](https://apps.yunohost.org/badge/integration/lstu)](https://ci-apps.yunohost.org/ci/apps/lstu/) 9 | ![Funtzionamendu egoera](https://apps.yunohost.org/badge/state/lstu) 10 | ![Mantentze egoera](https://apps.yunohost.org/badge/maintained/lstu) 11 | 12 | [![Instalatu Lstu YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=lstu) 13 | 14 | *[Irakurri README hau beste hizkuntzatan.](./ALL_README.md)* 15 | 16 | > *Pakete honek Lstu YunoHost zerbitzari batean azkar eta zailtasunik gabe instalatzea ahalbidetzen dizu.* 17 | > *YunoHost ez baduzu, kontsultatu [gida](https://yunohost.org/install) nola instalatu ikasteko.* 18 | 19 | ## Aurreikuspena 20 | 21 | Lstu means Let's Shorten That URL. 22 | 23 | 24 | **Paketatutako bertsioa:** 0.28-0~ynh4 25 | 26 | **Demoa:** 27 | 28 | ## Pantaila-argazkiak 29 | 30 | ![Lstu(r)en pantaila-argazkia](./doc/screenshots/LSTU_screenshot.png) 31 | 32 | ## Dokumentazioa eta baliabideak 33 | 34 | - Aplikazioaren webgune ofiziala: 35 | - Administratzaileen dokumentazio ofiziala: 36 | - Jatorrizko aplikazioaren kode-gordailua: 37 | - YunoHost Denda: 38 | - Eman errore baten berri: 39 | 40 | ## Garatzaileentzako informazioa 41 | 42 | Bidali `pull request`a [`testing` abarrera](https://github.com/YunoHost-Apps/lstu_ynh/tree/testing). 43 | 44 | `testing` abarra probatzeko, ondorengoa egin: 45 | 46 | ```bash 47 | sudo yunohost app install https://github.com/YunoHost-Apps/lstu_ynh/tree/testing --debug 48 | edo 49 | sudo yunohost app upgrade lstu -u https://github.com/YunoHost-Apps/lstu_ynh/tree/testing --debug 50 | ``` 51 | 52 | **Informazio gehiago aplikazioaren paketatzeari buruz:** 53 | -------------------------------------------------------------------------------- /README_fr.md: -------------------------------------------------------------------------------- 1 | 5 | 6 | # Lstu pour YunoHost 7 | 8 | [![Niveau d’intégration](https://apps.yunohost.org/badge/integration/lstu)](https://ci-apps.yunohost.org/ci/apps/lstu/) 9 | ![Statut du fonctionnement](https://apps.yunohost.org/badge/state/lstu) 10 | ![Statut de maintenance](https://apps.yunohost.org/badge/maintained/lstu) 11 | 12 | [![Installer Lstu avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=lstu) 13 | 14 | *[Lire le README dans d'autres langues.](./ALL_README.md)* 15 | 16 | > *Ce package vous permet d’installer Lstu rapidement et simplement sur un serveur YunoHost.* 17 | > *Si vous n’avez pas YunoHost, consultez [ce guide](https://yunohost.org/install) pour savoir comment l’installer et en profiter.* 18 | 19 | ## Vue d’ensemble 20 | 21 | Raccourcisseur d'URL 22 | 23 | 24 | **Version incluse :** 0.28-0~ynh4 25 | 26 | **Démo :** 27 | 28 | ## Captures d’écran 29 | 30 | ![Capture d’écran de Lstu](./doc/screenshots/LSTU_screenshot.png) 31 | 32 | ## Documentations et ressources 33 | 34 | - Site officiel de l’app : 35 | - Documentation officielle de l’admin : 36 | - Dépôt de code officiel de l’app : 37 | - YunoHost Store : 38 | - Signaler un bug : 39 | 40 | ## Informations pour les développeurs 41 | 42 | Merci de faire vos pull request sur la [branche `testing`](https://github.com/YunoHost-Apps/lstu_ynh/tree/testing). 43 | 44 | Pour essayer la branche `testing`, procédez comme suit : 45 | 46 | ```bash 47 | sudo yunohost app install https://github.com/YunoHost-Apps/lstu_ynh/tree/testing --debug 48 | ou 49 | sudo yunohost app upgrade lstu -u https://github.com/YunoHost-Apps/lstu_ynh/tree/testing --debug 50 | ``` 51 | 52 | **Plus d’infos sur le packaging d’applications :** 53 | -------------------------------------------------------------------------------- /README_gl.md: -------------------------------------------------------------------------------- 1 | 5 | 6 | # Lstu para YunoHost 7 | 8 | [![Nivel de integración](https://apps.yunohost.org/badge/integration/lstu)](https://ci-apps.yunohost.org/ci/apps/lstu/) 9 | ![Estado de funcionamento](https://apps.yunohost.org/badge/state/lstu) 10 | ![Estado de mantemento](https://apps.yunohost.org/badge/maintained/lstu) 11 | 12 | [![Instalar Lstu con YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=lstu) 13 | 14 | *[Le este README en outros idiomas.](./ALL_README.md)* 15 | 16 | > *Este paquete permíteche instalar Lstu de xeito rápido e doado nun servidor YunoHost.* 17 | > *Se non usas YunoHost, le a [documentación](https://yunohost.org/install) para saber como instalalo.* 18 | 19 | ## Vista xeral 20 | 21 | Lstu means Let's Shorten That URL. 22 | 23 | 24 | **Versión proporcionada:** 0.28-0~ynh4 25 | 26 | **Demo:** 27 | 28 | ## Capturas de pantalla 29 | 30 | ![Captura de pantalla de Lstu](./doc/screenshots/LSTU_screenshot.png) 31 | 32 | ## Documentación e recursos 33 | 34 | - Web oficial da app: 35 | - Documentación oficial para admin: 36 | - Repositorio de orixe do código: 37 | - Tenda YunoHost: 38 | - Informar dun problema: 39 | 40 | ## Info de desenvolvemento 41 | 42 | Envía a túa colaboración á [rama `testing`](https://github.com/YunoHost-Apps/lstu_ynh/tree/testing). 43 | 44 | Para probar a rama `testing`, procede deste xeito: 45 | 46 | ```bash 47 | sudo yunohost app install https://github.com/YunoHost-Apps/lstu_ynh/tree/testing --debug 48 | ou 49 | sudo yunohost app upgrade lstu -u https://github.com/YunoHost-Apps/lstu_ynh/tree/testing --debug 50 | ``` 51 | 52 | **Máis info sobre o empaquetado da app:** 53 | -------------------------------------------------------------------------------- /README_id.md: -------------------------------------------------------------------------------- 1 | 5 | 6 | # Lstu untuk YunoHost 7 | 8 | [![Tingkat integrasi](https://apps.yunohost.org/badge/integration/lstu)](https://ci-apps.yunohost.org/ci/apps/lstu/) 9 | ![Status kerja](https://apps.yunohost.org/badge/state/lstu) 10 | ![Status pemeliharaan](https://apps.yunohost.org/badge/maintained/lstu) 11 | 12 | [![Pasang Lstu dengan YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=lstu) 13 | 14 | *[Baca README ini dengan bahasa yang lain.](./ALL_README.md)* 15 | 16 | > *Paket ini memperbolehkan Anda untuk memasang Lstu secara cepat dan mudah pada server YunoHost.* 17 | > *Bila Anda tidak mempunyai YunoHost, silakan berkonsultasi dengan [panduan](https://yunohost.org/install) untuk mempelajari bagaimana untuk memasangnya.* 18 | 19 | ## Ringkasan 20 | 21 | Lstu means Let's Shorten That URL. 22 | 23 | 24 | **Versi terkirim:** 0.28-0~ynh4 25 | 26 | **Demo:** 27 | 28 | ## Tangkapan Layar 29 | 30 | ![Tangkapan Layar pada Lstu](./doc/screenshots/LSTU_screenshot.png) 31 | 32 | ## Dokumentasi dan sumber daya 33 | 34 | - Website aplikasi resmi: 35 | - Dokumentasi admin resmi: 36 | - Depot kode aplikasi hulu: 37 | - Gudang YunoHost: 38 | - Laporkan bug: 39 | 40 | ## Info developer 41 | 42 | Silakan kirim pull request ke [`testing` branch](https://github.com/YunoHost-Apps/lstu_ynh/tree/testing). 43 | 44 | Untuk mencoba branch `testing`, silakan dilanjutkan seperti: 45 | 46 | ```bash 47 | sudo yunohost app install https://github.com/YunoHost-Apps/lstu_ynh/tree/testing --debug 48 | atau 49 | sudo yunohost app upgrade lstu -u https://github.com/YunoHost-Apps/lstu_ynh/tree/testing --debug 50 | ``` 51 | 52 | **Info lebih lanjut mengenai pemaketan aplikasi:** 53 | -------------------------------------------------------------------------------- /README_it.md: -------------------------------------------------------------------------------- 1 | 5 | 6 | # Lstu per YunoHost 7 | 8 | [![Livello di integrazione](https://dash.yunohost.org/integration/lstu.svg)](https://dash.yunohost.org/appci/app/lstu) ![Stato di funzionamento](https://ci-apps.yunohost.org/ci/badges/lstu.status.svg) ![Stato di manutenzione](https://ci-apps.yunohost.org/ci/badges/lstu.maintain.svg) 9 | 10 | [![Installa Lstu con YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=lstu) 11 | 12 | *[Leggi questo README in altre lingue.](./ALL_README.md)* 13 | 14 | > *Questo pacchetto ti permette di installare Lstu su un server YunoHost in modo semplice e veloce.* 15 | > *Se non hai YunoHost, consulta [la guida](https://yunohost.org/install) per imparare a installarlo.* 16 | 17 | ## Panoramica 18 | 19 | Lstu means Let's Shorten That URL. 20 | 21 | 22 | **Versione pubblicata:** 0.26.0~ynh3 23 | 24 | **Prova:** 25 | 26 | ## Screenshot 27 | 28 | ![Screenshot di Lstu](./doc/screenshots/LSTU_screenshot.png) 29 | 30 | ## Documentazione e risorse 31 | 32 | - Sito web ufficiale dell’app: 33 | - Documentazione ufficiale per gli amministratori: 34 | - Repository upstream del codice dell’app: 35 | - Store di YunoHost: 36 | - Segnala un problema: 37 | 38 | ## Informazioni per sviluppatori 39 | 40 | Si prega di inviare la tua pull request alla [branch di `testing`](https://github.com/YunoHost-Apps/lstu_ynh/tree/testing). 41 | 42 | Per provare la branch di `testing`, si prega di procedere in questo modo: 43 | 44 | ```bash 45 | sudo yunohost app install https://github.com/YunoHost-Apps/lstu_ynh/tree/testing --debug 46 | o 47 | sudo yunohost app upgrade lstu -u https://github.com/YunoHost-Apps/lstu_ynh/tree/testing --debug 48 | ``` 49 | 50 | **Maggiori informazioni riguardo il pacchetto di quest’app:** 51 | -------------------------------------------------------------------------------- /README_nl.md: -------------------------------------------------------------------------------- 1 | 5 | 6 | # Lstu voor Yunohost 7 | 8 | [![Integratieniveau](https://apps.yunohost.org/badge/integration/lstu)](https://ci-apps.yunohost.org/ci/apps/lstu/) 9 | ![Mate van functioneren](https://apps.yunohost.org/badge/state/lstu) 10 | ![Onderhoudsstatus](https://apps.yunohost.org/badge/maintained/lstu) 11 | 12 | [![Lstu met Yunohost installeren](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=lstu) 13 | 14 | *[Deze README in een andere taal lezen.](./ALL_README.md)* 15 | 16 | > *Met dit pakket kun je Lstu snel en eenvoudig op een YunoHost-server installeren.* 17 | > *Als je nog geen YunoHost hebt, lees dan [de installatiehandleiding](https://yunohost.org/install), om te zien hoe je 'm installeert.* 18 | 19 | ## Overzicht 20 | 21 | Lstu means Let's Shorten That URL. 22 | 23 | 24 | **Geleverde versie:** 0.28-0~ynh4 25 | 26 | **Demo:** 27 | 28 | ## Schermafdrukken 29 | 30 | ![Schermafdrukken van Lstu](./doc/screenshots/LSTU_screenshot.png) 31 | 32 | ## Documentatie en bronnen 33 | 34 | - Officiele website van de app: 35 | - Officiele beheerdersdocumentatie: 36 | - Upstream app codedepot: 37 | - YunoHost-store: 38 | - Meld een bug: 39 | 40 | ## Ontwikkelaarsinformatie 41 | 42 | Stuur je pull request alsjeblieft naar de [`testing`-branch](https://github.com/YunoHost-Apps/lstu_ynh/tree/testing). 43 | 44 | Om de `testing`-branch uit te proberen, ga als volgt te werk: 45 | 46 | ```bash 47 | sudo yunohost app install https://github.com/YunoHost-Apps/lstu_ynh/tree/testing --debug 48 | of 49 | sudo yunohost app upgrade lstu -u https://github.com/YunoHost-Apps/lstu_ynh/tree/testing --debug 50 | ``` 51 | 52 | **Verdere informatie over app-packaging:** 53 | -------------------------------------------------------------------------------- /README_pl.md: -------------------------------------------------------------------------------- 1 | 5 | 6 | # Lstu dla YunoHost 7 | 8 | [![Poziom integracji](https://apps.yunohost.org/badge/integration/lstu)](https://ci-apps.yunohost.org/ci/apps/lstu/) 9 | ![Status działania](https://apps.yunohost.org/badge/state/lstu) 10 | ![Status utrzymania](https://apps.yunohost.org/badge/maintained/lstu) 11 | 12 | [![Zainstaluj Lstu z YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=lstu) 13 | 14 | *[Przeczytaj plik README w innym języku.](./ALL_README.md)* 15 | 16 | > *Ta aplikacja pozwala na szybką i prostą instalację Lstu na serwerze YunoHost.* 17 | > *Jeżeli nie masz YunoHost zapoznaj się z [poradnikiem](https://yunohost.org/install) instalacji.* 18 | 19 | ## Przegląd 20 | 21 | Lstu means Let's Shorten That URL. 22 | 23 | 24 | **Dostarczona wersja:** 0.28-0~ynh4 25 | 26 | **Demo:** 27 | 28 | ## Zrzuty ekranu 29 | 30 | ![Zrzut ekranu z Lstu](./doc/screenshots/LSTU_screenshot.png) 31 | 32 | ## Dokumentacja i zasoby 33 | 34 | - Oficjalna strona aplikacji: 35 | - Oficjalna dokumentacja dla administratora: 36 | - Repozytorium z kodem źródłowym: 37 | - Sklep YunoHost: 38 | - Zgłaszanie błędów: 39 | 40 | ## Informacje od twórców 41 | 42 | Wyślij swój pull request do [gałęzi `testing`](https://github.com/YunoHost-Apps/lstu_ynh/tree/testing). 43 | 44 | Aby wypróbować gałąź `testing` postępuj zgodnie z instrukcjami: 45 | 46 | ```bash 47 | sudo yunohost app install https://github.com/YunoHost-Apps/lstu_ynh/tree/testing --debug 48 | lub 49 | sudo yunohost app upgrade lstu -u https://github.com/YunoHost-Apps/lstu_ynh/tree/testing --debug 50 | ``` 51 | 52 | **Więcej informacji o tworzeniu paczek aplikacji:** 53 | -------------------------------------------------------------------------------- /README_ru.md: -------------------------------------------------------------------------------- 1 | 5 | 6 | # Lstu для YunoHost 7 | 8 | [![Уровень интеграции](https://apps.yunohost.org/badge/integration/lstu)](https://ci-apps.yunohost.org/ci/apps/lstu/) 9 | ![Состояние работы](https://apps.yunohost.org/badge/state/lstu) 10 | ![Состояние сопровождения](https://apps.yunohost.org/badge/maintained/lstu) 11 | 12 | [![Установите Lstu с YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=lstu) 13 | 14 | *[Прочтите этот README на других языках.](./ALL_README.md)* 15 | 16 | > *Этот пакет позволяет Вам установить Lstu быстро и просто на YunoHost-сервер.* 17 | > *Если у Вас нет YunoHost, пожалуйста, посмотрите [инструкцию](https://yunohost.org/install), чтобы узнать, как установить его.* 18 | 19 | ## Обзор 20 | 21 | Lstu means Let's Shorten That URL. 22 | 23 | 24 | **Поставляемая версия:** 0.28-0~ynh4 25 | 26 | **Демо-версия:** 27 | 28 | ## Снимки экрана 29 | 30 | ![Снимок экрана Lstu](./doc/screenshots/LSTU_screenshot.png) 31 | 32 | ## Документация и ресурсы 33 | 34 | - Официальный веб-сайт приложения: 35 | - Официальная документация администратора: 36 | - Репозиторий кода главной ветки приложения: 37 | - Магазин YunoHost: 38 | - Сообщите об ошибке: 39 | 40 | ## Информация для разработчиков 41 | 42 | Пришлите Ваш запрос на слияние в [ветку `testing`](https://github.com/YunoHost-Apps/lstu_ynh/tree/testing). 43 | 44 | Чтобы попробовать ветку `testing`, пожалуйста, сделайте что-то вроде этого: 45 | 46 | ```bash 47 | sudo yunohost app install https://github.com/YunoHost-Apps/lstu_ynh/tree/testing --debug 48 | или 49 | sudo yunohost app upgrade lstu -u https://github.com/YunoHost-Apps/lstu_ynh/tree/testing --debug 50 | ``` 51 | 52 | **Больше информации о пакетировании приложений:** 53 | -------------------------------------------------------------------------------- /README_zh_Hans.md: -------------------------------------------------------------------------------- 1 | 5 | 6 | # YunoHost 上的 Lstu 7 | 8 | [![集成程度](https://apps.yunohost.org/badge/integration/lstu)](https://ci-apps.yunohost.org/ci/apps/lstu/) 9 | ![工作状态](https://apps.yunohost.org/badge/state/lstu) 10 | ![维护状态](https://apps.yunohost.org/badge/maintained/lstu) 11 | 12 | [![使用 YunoHost 安装 Lstu](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=lstu) 13 | 14 | *[阅读此 README 的其它语言版本。](./ALL_README.md)* 15 | 16 | > *通过此软件包,您可以在 YunoHost 服务器上快速、简单地安装 Lstu。* 17 | > *如果您还没有 YunoHost,请参阅[指南](https://yunohost.org/install)了解如何安装它。* 18 | 19 | ## 概况 20 | 21 | Lstu means Let's Shorten That URL. 22 | 23 | 24 | **分发版本:** 0.28-0~ynh4 25 | 26 | **演示:** 27 | 28 | ## 截图 29 | 30 | ![Lstu 的截图](./doc/screenshots/LSTU_screenshot.png) 31 | 32 | ## 文档与资源 33 | 34 | - 官方应用网站: 35 | - 官方管理文档: 36 | - 上游应用代码库: 37 | - YunoHost 商店: 38 | - 报告 bug: 39 | 40 | ## 开发者信息 41 | 42 | 请向 [`testing` 分支](https://github.com/YunoHost-Apps/lstu_ynh/tree/testing) 发送拉取请求。 43 | 44 | 如要尝试 `testing` 分支,请这样操作: 45 | 46 | ```bash 47 | sudo yunohost app install https://github.com/YunoHost-Apps/lstu_ynh/tree/testing --debug 48 | 或 49 | sudo yunohost app upgrade lstu -u https://github.com/YunoHost-Apps/lstu_ynh/tree/testing --debug 50 | ``` 51 | 52 | **有关应用打包的更多信息:** 53 | -------------------------------------------------------------------------------- /conf/logrotate: -------------------------------------------------------------------------------- 1 | 2 | __INSTALL_DIR__/log/production.log { 3 | # Effectue une rotation des logs tout les mois 4 | monthly 5 | # Ou si le fichier de log dépasse 100Mo 6 | size 100M 7 | # Garde un maximum de 12 anciens logs 8 | rotate 12 9 | # Compresse pas les logs avec gzip 10 | compress 11 | # Compresse le log au cycle suivant. Donc garde toujours 2 logs non compressés. 12 | delaycompress 13 | # Copie et tronque le journal pour permettre la poursuite de l'écriture. Plutôt que de déplacer le log. 14 | copytruncate 15 | # Ne renvoi pas d'erreur si le fichier de log est absent. 16 | missingok 17 | # Ne fait pas de rotation si le log est vide. 18 | notifempty 19 | # Garde les anciens logs dans le même dossier. 20 | noolddir 21 | } 22 | -------------------------------------------------------------------------------- /conf/lstu-minion@.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Shortened URLs service job queue 3 | Documentation=https://framagit.org/luc/lstu 4 | 5 | [Service] 6 | Type=forking 7 | User=__APP__ 8 | Restart=always 9 | RestartSec=10 10 | WorkingDirectory=__INSTALL_DIR__ 11 | ExecStart=/usr/bin/carton exec script/application minion worker 12 | 13 | [Install] 14 | WantedBy=multi-user.target 15 | -------------------------------------------------------------------------------- /conf/lstu.conf: -------------------------------------------------------------------------------- 1 | # vim:set sw=4 ts=4 sts=4 ft=perl expandtab: 2 | { 3 | #################### 4 | # Hypnotoad settings 5 | #################### 6 | # see http://mojolicio.us/perldoc/Mojo/Server/Hypnotoad for a full list of settings 7 | hypnotoad => { 8 | # array of IP addresses and ports you want to listen to 9 | listen => ['http://127.0.0.1:__PORT__'], 10 | # if you use Lstu behind a reverse proxy like Nginx, you want to set proxy to 1 11 | # if you use Lstu directly, let it commented 12 | #proxy => 1, 13 | }, 14 | 15 | # put a way to contact you here and uncomment it 16 | # MANDATORY 17 | contact => 'webmaster@__DOMAIN__', 18 | 19 | # array of random strings used to encrypt cookies 20 | # optional, default is ['fdjsofjoihrei'], PLEASE, CHANGE IT 21 | secrets => ['__SECRET__'], 22 | 23 | # secret passphrase to access some admin features 24 | # If you don't want to have a plain text password in configuration, 25 | # use hashed_adminpwd instead 26 | # optional, but you won't have access to admin /stats if not set and if hashed_adminpwd is not set either 27 | #adminpwd => 's3cr3T', 28 | 29 | # secret hashed passphrase to access some admin features 30 | # Hash your password by issuing `echo -n s3cr3T | sha256sum` on your terminal 31 | # optional, but you won't have access to admin /stats if not set and if adminpwd is not set either 32 | hashed_adminpwd => '__HASHED_PASSWORD__', 33 | 34 | # indicates if you want to really delete URLs from admin page (/stats) 35 | # or just want to deactivate the shorten URL (won’t redirect anymore, can’t be used anymore) 36 | # optional, default to 0 (false) 37 | #really_delete_urls => 0, 38 | 39 | # choose a theme. See the available themes in `themes` directory 40 | # optional, default is 'default' 41 | theme => 'milligram', # default or milligram 42 | 43 | # number of URLs to be displayed per page in /stats 44 | # optional, default is 10 45 | page_offset => 10, 46 | 47 | # length of the random URL 48 | # optional, default is 8 49 | length => 8, 50 | 51 | # how many URLs will be provisioned in a batch ? 52 | # optional, default is 5 53 | #provis_step => 5, 54 | 55 | # max number of URLs to be provisioned 56 | # optional, default is 100 57 | #provisioning => 100, 58 | 59 | # URL sub-directory in which you want Lstu to be accessible 60 | # example: you want to have Lstu under https://example.org/lstu/ 61 | # => set prefix to '/lstu' or to '/lstu/', it doesn't matter 62 | # optional, defaut is / 63 | prefix => '__PATH__', 64 | 65 | # array of authorized domains for API calls. 66 | # if you want to authorize everyone to use the API: ['*'] 67 | # optional, no domains allowed by default 68 | #allowed_domains => ['http://1.example.com', 'http://2.example.com'], 69 | 70 | # if set, the shortened URLs will use this domain 71 | # optional 72 | #fixed_domain => 'example.org', 73 | 74 | # if set to 1, Lstu will try to prevent its use without using the web interface 75 | # optional, default is 0 76 | #disable_api => 0, 77 | 78 | # choose what database you want to use 79 | # valid choices are sqlite, postgresql and mysql (all lowercase) 80 | # optional, default is sqlite 81 | dbtype => 'postgresql', 82 | 83 | # SQLite ONLY - only used if dbtype is set to sqlite 84 | # define a path to the SQLite database 85 | # you can define it relative to lstu directory or set an absolute path 86 | # remember that it has to be in a directory writable by Lstu user 87 | # optional, default is lstu.db 88 | #db_path => 'lstu.db', 89 | 90 | # PostgreSQL ONLY - only used if dbtype is set to postgresql 91 | # these are the credentials to access the PostgreSQL database 92 | # mandatory if you choosed postgresql as dbtype 93 | pgdb => { 94 | database => '__DB_NAME__', 95 | host => 'localhost', 96 | # optional, default is 5432 97 | #port => 5432, 98 | user => '__DB_USER__', 99 | pwd => '__DB_PWD__', 100 | # optional, default is 1 101 | #max_connections => 1, 102 | }, 103 | 104 | # MySQL ONLY - only used if dbtype is set to mysql 105 | # these are the credentials to access the MySQL database 106 | # mandatory if you choosed mysql as dbtype 107 | #mysqldb => { 108 | # database => 'lstu', 109 | # host => 'localhost', 110 | # # optional, default is 3306 111 | # #port => 3306, 112 | # user => 'DBUSER', 113 | # pwd => 'DBPASSWORD', 114 | # # optional, default is 5 (set to 0 to disable persistent connections) 115 | # #max_connections => 5, 116 | #}, 117 | 118 | # Rate-limiting for the API 119 | # After ban_min_strike requests in a second, the IP address will be 120 | # banned for one hour. 121 | # If it continues to query the API during this ban time at least 122 | # ban_min_strike times, it will be banned for a month. 123 | # optional, default is 3 124 | ban_min_strike => 3, 125 | 126 | # Ban whitelist 127 | # You can whitelist IP addresses to prevent you from being banned 128 | # Be careful, the IP addresses are compared as string, not as IP addresses 129 | # a network range will not work 130 | # Example of valid input: ban_whitelist => ['198.51.100.42', '2001:0DB8::42'],¬ 131 | # optional, default is an empty array 132 | #ban_whitelist => [], 133 | 134 | # Ban blacklist 135 | # You can blacklist IP addresses to always ban those IP addresses 136 | # Be careful, the IP addresses are compared as string, not as IP addresses 137 | # a network range will not work 138 | # Example of valid input: ban_blacklist => ['198.51.100.42', '2001:0DB8::42'],¬ 139 | # optional, default is an empty array 140 | #ban_blacklist => [], 141 | 142 | # define an URL to the Piwik instance and the ID of a website to track 143 | # set if you want to track views in Piwik 144 | # optional, Piwik tracking is disabled by default 145 | #piwik => { 146 | # url => 'http://piwik.example.com', 147 | # idsite => '1', 148 | #}, 149 | 150 | # use Minion instead of directly increase counters 151 | # need to launch a minion worker service if enabled 152 | # optional, Minion is disabled by default 153 | # It will use the same DB type as Lstu: sqlite if you choose sqlite for `dbtype`, 154 | # postgresql for postgresql, etc. 155 | #minion => { 156 | # enabled => 0, 157 | # # SQLite ONLY - only used if if you choose sqlite as DB type, 158 | # # define the path to the minion database 159 | # # you can define it relative to lstu directory or set an absolute path 160 | # # remember that it has to be in a directory writable by Lutim user 161 | # # optional, default is minion.db 162 | # db_path => 'minion.db', 163 | # # PostgreSQL ONLY - only used if you choose postgresql as DB type 164 | # # these are the credentials to access the Minion's PostgreSQL database 165 | # # mandatory if you choosed postgresql as DB type, no default 166 | # pgdb => { 167 | # database => 'lstu_minion', 168 | # host => 'localhost', 169 | # # optional, default is 5432 170 | # #port => 5432, 171 | # user => 'DBUSER', 172 | # pwd => 'DBPASSWORD' 173 | # }, 174 | # # MySQL ONLY - only used if you choose mysql as DB type 175 | # # these are the credentials to access the Minion's MySQL database 176 | # # mandatory if you choosed mysql as DB type, no default 177 | # mysqldb => { 178 | # database => 'lstu_minion', 179 | # host => 'localhost', 180 | # # optional, default is 3306 181 | # #port => 3306, 182 | # user => 'DBUSER', 183 | # pwd => 'DBPASSWORD', 184 | # }, 185 | #}, 186 | 187 | # set `ldap` if you want that only authenticated users can shorten URLs 188 | # please note that everybody can still use shortend URLs 189 | # optional, no default 190 | ldap => { 191 | uri => 'ldap://localhost:389', # server URI 192 | user_tree => 'dc=yunohost,dc=org', # search base DN 193 | bind_dn => 'ou=users,dc=yunohost,dc=org', # search bind DN 194 | # bind_pwd => '', # search bind password 195 | user_attr => 'uid', # user attribute (uid, mail, sAMAccountName, etc.) 196 | # user_filter => '(!(uid=ldap_user))', # user filter (to exclude some users, etc.) 197 | }, 198 | 199 | # set `htpasswd` if you want to use an htpasswd file instead of ldap 200 | # create the file with `htpasswd -c lstu.passwd user`, update it with `htpasswd lstu.passwd user2` 201 | # make sure that lstu can read the file! 202 | # optional, no default 203 | #htpasswd => 'lstu.passwd', 204 | 205 | # if you've set ldap or htpasswd above, the session will last `session_duration` seconds before 206 | # the user needs to reauthenticate 207 | # optional, default is 3600 208 | #session_duration => 3600, 209 | 210 | # how many redirections are allowed for the shortened URL before considering it as a spam? 211 | # optional, default is 2. Set to -1 to allow infinite redirections (not recommended) 212 | #max_redir => 2, 213 | 214 | # spam blacklist regex. All URLs (or redirection) whose host part matches this regex are considered as spam 215 | # optional, no default 216 | #spam_blacklist_regex => 'foo|bar', 217 | 218 | # spam path blacklist regex. All URLs (or redirection) whose path part matches this regex are considered as spam 219 | # optional, no default 220 | #spam_path_blacklist_regex => 'foo|bar', 221 | 222 | # spam whitelist regex. All URLs (or redirection) whose host part matches this regex will never be considered as spam 223 | # optional, no default 224 | #spam_whitelist_regex => 'foo|bar', 225 | 226 | # set to 1 to skip SpamHaus check (not recommended) 227 | # optional, default is 0 228 | #skip_spamhaus => 0, 229 | 230 | # put your Google API key to enable Google safebrowsing check 231 | # This will allow Lstu to download the Google safebrowsing database and use a local copy to check the URLs. 232 | # Google does not get the URLs that are checked. 233 | # Instructions to get a key: https://developers.google.com/safe-browsing/v4/get-started 234 | # TL;DR: https://console.developers.google.com/projectselector/apis/library 235 | # optional, no default 236 | #safebrowsing_api_key => '', 237 | 238 | # array of memcached servers to cache URL in order to accelerate responses to often-viewed URL. 239 | # If set to [], the cache is disabled 240 | # optional, default is [] 241 | #memcached_servers => [], 242 | 243 | # Content-Security-Policy header that will be sent by Lstu 244 | # Set to '' to disable CSP header 245 | # https://content-security-policy.com/ provides a good documentation about CSP. 246 | # https://report-uri.com/home/generate provides a tool to generate a CSP header. 247 | # optional, default is "default-src 'none'; script-src 'self'; style-src 'self'; img-src 'self' data:; font-src 'self'; form-action 'self'; base-uri 'self'" 248 | # the default value is good for `default` and `milligram` themes 249 | #csp => "default-src 'none'; script-src 'self'; style-src 'self'; img-src 'self' data:; font-src 'self'; form-action 'self'; base-uri 'self'", 250 | 251 | # X-Frame-Options header that will be sent by Lstu 252 | # Valid values are: 'DENY', 'SAMEORIGIN', 'ALLOW-FROM https://example.com/' 253 | # Set to '' to disable X-Frame-Options header 254 | # See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options 255 | # Please note that this will add a "frame-ancestors" directive to the CSP header (see above) accordingly 256 | # to the chosen setting (See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/frame-ancestors) 257 | # optional, default is 'DENY' 258 | #x_frame_options => 'DENY', 259 | 260 | # X-Content-Type-Options that will be sent by Lstu 261 | # See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options 262 | # Set to '' to disable X-Content-Type-Options header 263 | # optional, default is 'nosniff' 264 | #x_content_type_options => 'nosniff', 265 | 266 | # X-XSS-Protection that will be sent by Lstu 267 | # See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection 268 | # Set to '' to disable X-XSS-Protection header 269 | # optional, default is '1; mode=block' 270 | #x_xss_protection => '1; mode=block', 271 | 272 | # Log creator's IP address 273 | # Set to 1 if you want to register the IP addresses of URL creators 274 | # optional, default is 0 275 | #log_creator_ip => 0, 276 | 277 | # Positive integer which specifies how many pixels one "module" (one block of the QR code) occupies. 278 | # You can't use fractional values. An arbitrary upper limit of 100 is imposed by Image::PNG::QRCode module. 279 | # optional, default is 3 280 | #qrcode_size => 3, 281 | }; 282 | -------------------------------------------------------------------------------- /conf/nginx.conf: -------------------------------------------------------------------------------- 1 | #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; 2 | location __PATH__/ { 3 | 4 | access_log /var/log/nginx/lstu.access.log; 5 | error_log /var/log/nginx/lstu.error.log; 6 | 7 | proxy_pass http://127.0.0.1:__PORT__; 8 | 9 | proxy_http_version 1.1; 10 | proxy_set_header Host $host; 11 | proxy_set_header X-Real-IP $remote_addr; 12 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 13 | proxy_set_header X-Remote-Port $remote_port; 14 | proxy_set_header X-Forwarded-Proto $scheme; 15 | 16 | # We expect the downsteam servers to redirect to the right hostname, so don't do any rewrite$ 17 | proxy_redirect off; 18 | } 19 | -------------------------------------------------------------------------------- /conf/systemd.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Lstu: Shortened URLs service 3 | Documentation=https://framagit.org/luc/lstu 4 | Requires=network.target 5 | After=network.target 6 | 7 | [Service] 8 | Type=forking 9 | User=__APP__ 10 | Group=__APP__ 11 | Restart=always 12 | RestartSec=10 13 | WorkingDirectory=__INSTALL_DIR__ 14 | PIDFile=__INSTALL_DIR__/script/hypnotoad.pid 15 | ExecStart=/usr/bin/carton exec hypnotoad script/lstu 16 | ExecStop=/usr/bin/carton exec hypnotoad -s script/lstu 17 | ExecReload=/usr/bin/carton exec hypnotoad script/lstu 18 | 19 | [Install] 20 | WantedBy=multi-user.target 21 | -------------------------------------------------------------------------------- /doc/ADMIN.md: -------------------------------------------------------------------------------- 1 | How to configure this app: a plain file at `__INSTALL_DIR__/lstu.conf` with SSH. 2 | -------------------------------------------------------------------------------- /doc/ADMIN_fr.md: -------------------------------------------------------------------------------- 1 | Comment configurer cette application : un fichier simple à `__INSTALL_DIR__/lstu.conf` avec SSH. 2 | -------------------------------------------------------------------------------- /doc/DESCRIPTION.md: -------------------------------------------------------------------------------- 1 | Lstu means Let's Shorten That URL. 2 | -------------------------------------------------------------------------------- /doc/DESCRIPTION_fr.md: -------------------------------------------------------------------------------- 1 | Raccourcisseur d'URL 2 | -------------------------------------------------------------------------------- /doc/screenshots/LSTU_screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YunoHost-Apps/lstu_ynh/d3d89ba1c2d8f50fe37d9f9696c01c1bada679c9/doc/screenshots/LSTU_screenshot.png -------------------------------------------------------------------------------- /manifest.toml: -------------------------------------------------------------------------------- 1 | packaging_format = 2 2 | 3 | id = "lstu" 4 | name = "Lstu" 5 | description.en = "URL Shortener" 6 | description.fr = "Raccourcisseur d'URL" 7 | 8 | version = "0.28-0~ynh4" 9 | 10 | maintainers = ["frju365"] 11 | 12 | [upstream] 13 | license = "WTFPL" 14 | website = "https://lstu.fr" 15 | demo = "https://lstu.fr" 16 | admindoc = "https://framagit.org/fiat-tux/hat-softwares/lstu/wikis/home" 17 | code = "https://framagit.org/fiat-tux/hat-softwares/lstu" 18 | 19 | [integration] 20 | yunohost = ">= 12.0.9" 21 | helpers_version = "2.1" 22 | architectures = "all" 23 | multi_instance = true 24 | 25 | ldap = true 26 | sso = true 27 | 28 | disk = "50M" 29 | ram.build = "50M" 30 | ram.runtime = "50M" 31 | 32 | [install] 33 | [install.domain] 34 | type = "domain" 35 | 36 | [install.path] 37 | type = "path" 38 | default = "/lstu" 39 | 40 | [install.init_main_permission] 41 | type = "group" 42 | default = "visitors" 43 | 44 | [install.password] 45 | type = "password" 46 | 47 | [resources] 48 | [resources.sources.main] 49 | url = "https://framagit.org/fiat-tux/hat-softwares/lstu/-/archive/0.28-0/lstu-0.28-0.tar.gz" 50 | sha256 = "bb6531dbbc67800b818147fa0758b3581f4a8bf0267537f4ba598334c0c7ab3b" 51 | autoupdate.strategy = "latest_gitlab_release" 52 | 53 | [resources.ports] 54 | 55 | [resources.system_user] 56 | 57 | [resources.install_dir] 58 | 59 | [resources.permissions] 60 | main.url = "/" 61 | 62 | [resources.apt] 63 | packages = [ 64 | "build-essential", 65 | "libssl-dev", 66 | "zlib1g-dev", 67 | "libpng-dev", 68 | "libpq-dev", 69 | "libpod-parser-perl", 70 | "carton", 71 | "memcached", 72 | "postgresql", 73 | ] 74 | 75 | [resources.database] 76 | type = "postgresql" 77 | -------------------------------------------------------------------------------- /scripts/_common.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #================================================= 4 | # COMMON VARIABLES AND CUSTOM HELPERS 5 | #================================================= 6 | -------------------------------------------------------------------------------- /scripts/backup: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source ../settings/scripts/_common.sh 4 | source /usr/share/yunohost/helpers 5 | 6 | ynh_print_info "Declaring files to be backed up..." 7 | 8 | #================================================= 9 | # BACKUP THE APP MAIN DIR 10 | #================================================= 11 | 12 | ynh_backup "$install_dir" 13 | 14 | #================================================= 15 | # BACKUP THE NGINX CONFIGURATION 16 | #================================================= 17 | 18 | ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf" 19 | 20 | ynh_backup "/etc/logrotate.d/$app" 21 | 22 | ynh_backup "/etc/systemd/system/$app.service" 23 | 24 | #================================================= 25 | # BACKUP THE POSTGRESQL DATABASE 26 | #================================================= 27 | ynh_print_info "Backing up the PostgreSQL database..." 28 | 29 | ynh_psql_dump_db > db.sql 30 | 31 | #================================================= 32 | # END OF SCRIPT 33 | #================================================= 34 | 35 | ynh_print_info "Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." 36 | -------------------------------------------------------------------------------- /scripts/change_url: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source _common.sh 4 | source /usr/share/yunohost/helpers 5 | 6 | #================================================= 7 | # STOP SYSTEMD SERVICE 8 | #================================================= 9 | ynh_script_progression "Stopping $app's systemd service..." 10 | 11 | ynh_systemctl --service=$app --action="stop" --log_path="systemd" 12 | 13 | #================================================= 14 | # MODIFY URL IN NGINX CONF 15 | #================================================= 16 | ynh_script_progression "Updating NGINX web server configuration..." 17 | 18 | ynh_config_change_url_nginx 19 | 20 | #================================================= 21 | # UPDATE A CONFIG FILE 22 | #================================================= 23 | ynh_script_progression "Updating configuration..." 24 | 25 | ynh_config_add --template="lstu.conf" --destination="$install_dir/lstu.conf" 26 | 27 | #================================================= 28 | # START SYSTEMD SERVICE 29 | #================================================= 30 | ynh_script_progression "Starting $app's systemd service..." 31 | 32 | ynh_systemctl --service=$app --action="start" --log_path="systemd" --wait_until="Web application available at" 33 | 34 | #================================================= 35 | # END OF SCRIPT 36 | #================================================= 37 | 38 | ynh_script_progression "Change of URL completed for $app" 39 | -------------------------------------------------------------------------------- /scripts/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source _common.sh 4 | source /usr/share/yunohost/helpers 5 | 6 | #================================================= 7 | # RETRIEVE ARGUMENTS FROM THE MANIFEST 8 | #================================================= 9 | 10 | secret=$(ynh_string_random --length=24) 11 | hashed_password=$(echo -n $password | sha256sum | cut -d' ' -f1) 12 | 13 | #================================================= 14 | # STORE SETTINGS FROM MANIFEST 15 | #================================================= 16 | ynh_script_progression "Storing installation settings..." 17 | 18 | ynh_app_setting_set --key=secret --value=$secret 19 | ynh_app_setting_set --key=hashed_password --value=$hashed_password 20 | 21 | #================================================= 22 | # DOWNLOAD, CHECK AND UNPACK SOURCE 23 | #================================================= 24 | ynh_script_progression "Setting up source files..." 25 | 26 | ynh_setup_source --dest_dir="$install_dir" 27 | 28 | #================================================= 29 | # NGINX CONFIGURATION 30 | #================================================= 31 | ynh_script_progression "Configuring NGINX web server..." 32 | 33 | ynh_config_add_nginx 34 | 35 | ynh_config_add_systemd 36 | 37 | ynh_config_add_logrotate 38 | 39 | yunohost service add $app --log="/var/log/$app.log" --log="/var/www/$app/log/production.log" 40 | 41 | #================================================= 42 | # ADD A CONFIGURATION 43 | #================================================= 44 | ynh_script_progression "Adding $app's configuration..." 45 | 46 | ynh_config_add --template="lstu.conf" --destination="$install_dir/lstu.conf" 47 | 48 | #================================================= 49 | # INSTALL LSTU 50 | #================================================= 51 | ynh_script_progression "Installing Lstu..." 52 | 53 | pushd $install_dir 54 | ynh_hide_warnings carton install --without=sqlite --without=mysql 55 | popd 56 | 57 | #================================================= 58 | # START SYSTEMD SERVICE 59 | #================================================= 60 | ynh_script_progression "Starting $app's systemd service..." 61 | 62 | ynh_systemctl --service=$app --action="start" --log_path="systemd" --wait_until="Web application available at" 63 | 64 | #================================================= 65 | # END OF SCRIPT 66 | #================================================= 67 | 68 | ynh_script_progression "Installation of $app completed" 69 | -------------------------------------------------------------------------------- /scripts/remove: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source _common.sh 4 | source /usr/share/yunohost/helpers 5 | 6 | #================================================= 7 | # REMOVE SERVICE INTEGRATION IN YUNOHOST 8 | #================================================= 9 | 10 | if ynh_hide_warnings yunohost service status $app >/dev/null; then 11 | yunohost service remove $app 12 | fi 13 | 14 | ynh_config_remove_systemd 15 | 16 | ynh_config_remove_logrotate 17 | 18 | ynh_config_remove_nginx 19 | 20 | #================================================= 21 | # END OF SCRIPT 22 | #================================================= 23 | 24 | ynh_script_progression "Removal of $app completed" 25 | -------------------------------------------------------------------------------- /scripts/restore: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source ../settings/scripts/_common.sh 4 | source /usr/share/yunohost/helpers 5 | 6 | #================================================= 7 | # RESTORE THE APP MAIN DIR 8 | #================================================= 9 | ynh_script_progression "Restoring the app main directory..." 10 | 11 | ynh_restore "$install_dir" 12 | 13 | #================================================= 14 | # RESTORE THE POSTGRESQL DATABASE 15 | #================================================= 16 | ynh_script_progression "Restoring the PostregSQL database..." 17 | 18 | ynh_psql_db_shell < ./db.sql 19 | 20 | #================================================= 21 | # RESTORE SYSTEM CONFIGURATIONS 22 | #================================================= 23 | ynh_script_progression "Restoring system configurations related to $app..." 24 | 25 | ynh_restore "/etc/nginx/conf.d/$domain.d/$app.conf" 26 | 27 | ynh_restore "/etc/systemd/system/$app.service" 28 | systemctl enable $app.service --quiet 29 | 30 | ynh_restore "/etc/logrotate.d/$app" 31 | 32 | yunohost service add $app --log="/var/log/$app.log" --log="/var/www/$app/log/production.log" 33 | 34 | #================================================= 35 | # RELOAD NGINX AND PHP-FPM OR THE APP SERVICE 36 | #================================================= 37 | ynh_script_progression "Reloading NGINX web server and $app's service..." 38 | 39 | ynh_systemctl --service=$app --action="start" --log_path="systemd" --wait_until="Web application available at" 40 | 41 | ynh_systemctl --service=nginx --action=reload 42 | 43 | #================================================= 44 | # END OF SCRIPT 45 | #================================================= 46 | 47 | ynh_script_progression "Restoration completed for $app" 48 | -------------------------------------------------------------------------------- /scripts/upgrade: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source _common.sh 4 | source /usr/share/yunohost/helpers 5 | 6 | #================================================= 7 | # STOP SYSTEMD SERVICE 8 | #================================================= 9 | ynh_script_progression "Stopping $app's systemd service..." 10 | 11 | ynh_systemctl --service=$app --action="stop" --log_path="systemd" 12 | 13 | #================================================= 14 | # DOWNLOAD, CHECK AND UNPACK SOURCE 15 | #================================================= 16 | ynh_script_progression "Upgrading source files..." 17 | 18 | ynh_setup_source --dest_dir="$install_dir" --keep="lstu.conf" 19 | 20 | #================================================= 21 | # UPDATE A CONFIG FILE 22 | #================================================= 23 | ynh_script_progression "Updating configuration..." 24 | 25 | ynh_config_add --template="lstu.conf" --destination="$install_dir/lstu.conf" 26 | 27 | #================================================= 28 | # BUILD LSU 29 | #================================================= 30 | ynh_script_progression "Building $app..." 31 | 32 | pushd $install_dir 33 | ynh_safe_rm "$install_dir/local" 34 | ynh_hide_warnings carton install --without=sqlite --without=mysql 35 | popd 36 | 37 | #================================================= 38 | # SETUP SYSTEMD 39 | #================================================= 40 | ynh_script_progression "Upgrading systemd configuration..." 41 | 42 | ynh_config_add_nginx 43 | 44 | ynh_config_add_systemd 45 | 46 | ynh_config_add_logrotate 47 | 48 | yunohost service add $app --log="/var/log/$app.log" --log="/var/www/$app/log/production.log" 49 | 50 | #================================================= 51 | # START SYSTEMD SERVICE 52 | #================================================= 53 | ynh_script_progression "Starting $app's systemd service..." 54 | 55 | ynh_systemctl --service=$app --action=reload --log_path="systemd" --wait_until="Web application available at" 56 | 57 | #================================================= 58 | # END OF SCRIPT 59 | #================================================= 60 | 61 | ynh_script_progression "Upgrade of $app completed" 62 | -------------------------------------------------------------------------------- /tests.toml: -------------------------------------------------------------------------------- 1 | test_format = 1.0 2 | 3 | [default] 4 | 5 | # ------------------------------- 6 | # Commits to test upgrade from 7 | # ------------------------------- 8 | 9 | #test_upgrade_from.af9f0258204e71bc567206ef2dc00d151319fa21.name = "Upgrade from 0.26.0~ynh2" 10 | --------------------------------------------------------------------------------