Compare commits

..

1 commit

36 changed files with 747 additions and 922 deletions

1
.gitignore vendored
View file

@ -1,3 +1,2 @@
*~
*.sw[op]
.DS_Store

View file

@ -1,12 +0,0 @@
# All available README files by language
- [Read the README in English](README.md)
- [Lea el README en español](README_es.md)
- [Irakurri README euskaraz](README_eu.md)
- [Lire le README en français](README_fr.md)
- [Le o README en galego](README_gl.md)
- [Baca README dalam bahasa bahasa Indonesia](README_id.md)
- [Lees de README in het Nederlands](README_nl.md)
- [Przeczytaj README w języku polski](README_pl.md)
- [Прочитать README на русский](README_ru.md)
- [阅读中文(简体)的 README](README_zh_Hans.md)

View file

@ -1 +1,4 @@
AGPL-3
File containing the license of your package.
More information here:
https://choosealicense.com/

View file

@ -1,73 +1,85 @@
# Packaging an app, starting from this example
* Copy this app before working on it, using the ['Use this template'](https://github.com/YunoHost/example_ynh/generate) button on the Github repo.
* Edit the `manifest.toml` with app specific info.
* Edit the `install`, `upgrade`, `remove`, `backup` and `restore` scripts, and any relevant conf files in `conf/`.
* Using the [script helpers documentation.](https://yunohost.org/packaging_apps_helpers)
* Edit the `change_url` and `config` scripts too, or remove them if you have no use of them
* Add a `LICENSE` file for the package. NB: this LICENSE file is not meant to necessarily be the LICENSE of the upstream app - it is only the LICENSE you want this package's code to published with ;). We recommend to use [the AGPL-3](https://www.gnu.org/licenses/agpl-3.0.txt).
* Edit files under the `doc/` directory
* The `README.md` files are to be automatically generated by <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
---
<!--
N.B.: This README was automatically generated by <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/readme_generator
It shall NOT be edited by hand.
-->
# My Idlers for YunoHost
# Example app for YunoHost
[![Integration level](https://apps.yunohost.org/badge/integration/my_idlers)](https://ci-apps.yunohost.org/ci/apps/my_idlers/)
![Working status](https://apps.yunohost.org/badge/state/my_idlers)
![Maintenance status](https://apps.yunohost.org/badge/maintained/my_idlers)
[![Integration level](https://dash.yunohost.org/integration/example.svg)](https://dash.yunohost.org/appci/app/example) ![Working status](https://ci-apps.yunohost.org/ci/badges/example.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/example.maintain.svg)
[![Install Example app with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=example)
[![Install My Idlers with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=my_idlers)
*[Lire ce readme en français.](./README_fr.md)*
*[Read this README in other languages.](./ALL_README.md)*
> *This package allows you to install My Idlers quickly and simply on a YunoHost server.*
> *If you don't have YunoHost, please consult [the guide](https://yunohost.org/install) to learn how to install it.*
> *This package allows you to install Example app 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
If you are the person in your family, group of friends or colleauges that manages the servers, domain names, online accounts and other hosted services, than this app is for you.
Some long and extensive description of what the app is and does, lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
My Idlers is a useful register for keeping track of your servers and online hosting accounts.
### Features
It is a single-user app; if more than one person wants to use this functionality, it needs to be installed multiple times.
Besides that, for now, it needs a (sub)domain for itself.
This is my first app packaging attempt; there may be some rough edges.
What works:
* installing the app and using its features
* uninstalling
* backup
* moving the app to another domain
What does not (yet?) work or is untested:
* installing the app in subfolder
* LDAP integration
* restore from backup
* API access
![Screenshot of My Idlers](./doc/screenshots/my_idlers.jpg)
- Ut enim ad minim veniam, quis nostrud exercitation ullamco ;
- Laboris nisi ut aliquip ex ea commodo consequat ;
- Duis aute irure dolor in reprehenderit in voluptate ;
- Velit esse cillum dolore eu fugiat nulla pariatur ;
- Excepteur sint occaecat cupidatat non proident, sunt in culpa."
**Shipped version:** 3.0~ynh1
**Shipped version:** 1.0~ynh1
**Demo:** <https://demo.myidlers.com/login>
**Demo:** https://demo.example.com
## Screenshots
![Screenshot of My Idlers](./doc/screenshots/example.jpg)
![Screenshot of My Idlers](./doc/screenshots/my_idlers.jpg)
![Screenshot of Example app](./doc/screenshots/example.jpg)
## Disclaimers / important information
* Any known limitations, constrains or stuff not working, such as (but not limited to):
* requiring a full dedicated domain ?
* architectures not supported ?
* not-working single-sign on or LDAP integration ?
* the app requires an important amount of RAM / disk / .. to install or to work properly
* etc...
* Other infos that people should be aware of, such as:
* any specific step to perform after installing (such as manually finishing the install, specific admin credentials, ...)
* how to configure / administrate the application if it ain't obvious
* upgrade process / specificities / things to be aware of ?
* security considerations ?
## Documentation and resources
- Official user documentation: <https://lowendspirit.com/discussion/2449/my-idlers-self-hosted-web-app-for-your-servers-shared-hosting-and-domains-information/>
- Upstream app code repository: <https://github.com/cp6/my-idlers#install>
- YunoHost Store: <https://apps.yunohost.org/app/my_idlers>
- Report a bug: <https://github.com/YunoHost-Apps/my_idlers_ynh/issues>
* Official app website: <https://example.com>
* Official user documentation: <https://yunohost.org/apps>
* Official admin documentation: <https://yunohost.org/packaging_apps>
* Upstream app code repository: <https://some.forge.com/example/example>
* YunoHost documentation for this app: <https://yunohost.org/app_example>
* Report a bug: <https://github.com/YunoHost-Apps/example_ynh/issues>
## Developer info
Please send your pull request to the [`testing` branch](https://github.com/YunoHost-Apps/my_idlers_ynh/tree/testing).
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/example_ynh/tree/testing).
To try the `testing` branch, please proceed like that:
To try the testing branch, please proceed like that.
```bash
sudo yunohost app install https://github.com/YunoHost-Apps/my_idlers_ynh/tree/testing --debug
``` bash
sudo yunohost app install https://github.com/YunoHost-Apps/example_ynh/tree/testing --debug
or
sudo yunohost app upgrade my_idlers -u https://github.com/YunoHost-Apps/my_idlers_ynh/tree/testing --debug
sudo yunohost app upgrade example -u https://github.com/YunoHost-Apps/example_ynh/tree/testing --debug
```
**More info regarding app packaging:** <https://yunohost.org/packaging_apps>

View file

@ -1,73 +0,0 @@
<!--
Este archivo README esta generado automaticamente<https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
No se debe editar a mano.
-->
# My Idlers para Yunohost
[![Nivel de integración](https://apps.yunohost.org/badge/integration/my_idlers)](https://ci-apps.yunohost.org/ci/apps/my_idlers/)
![Estado funcional](https://apps.yunohost.org/badge/state/my_idlers)
![Estado En Mantención](https://apps.yunohost.org/badge/maintained/my_idlers)
[![Instalar My Idlers con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=my_idlers)
*[Leer este README en otros idiomas.](./ALL_README.md)*
> *Este paquete le permite instalarMy Idlers rapidamente y simplement en un servidor YunoHost.*
> *Si no tiene YunoHost, visita [the guide](https://yunohost.org/install) para aprender como instalarla.*
## Descripción general
If you are the person in your family, group of friends or colleauges that manages the servers, domain names, online accounts and other hosted services, than this app is for you.
My Idlers is a useful register for keeping track of your servers and online hosting accounts.
It is a single-user app; if more than one person wants to use this functionality, it needs to be installed multiple times.
Besides that, for now, it needs a (sub)domain for itself.
This is my first app packaging attempt; there may be some rough edges.
What works:
* installing the app and using its features
* uninstalling
* backup
* moving the app to another domain
What does not (yet?) work or is untested:
* installing the app in subfolder
* LDAP integration
* restore from backup
* API access
![Screenshot of My Idlers](./doc/screenshots/my_idlers.jpg)
**Versión actual:** 3.0~ynh1
**Demo:** <https://demo.myidlers.com/login>
## Capturas
![Captura de My Idlers](./doc/screenshots/example.jpg)
![Captura de My Idlers](./doc/screenshots/my_idlers.jpg)
## Documentaciones y recursos
- Documentación usuario oficial: <https://lowendspirit.com/discussion/2449/my-idlers-self-hosted-web-app-for-your-servers-shared-hosting-and-domains-information/>
- Repositorio del código fuente oficial de la aplicación : <https://github.com/cp6/my-idlers#install>
- Catálogo YunoHost: <https://apps.yunohost.org/app/my_idlers>
- Reportar un error: <https://github.com/YunoHost-Apps/my_idlers_ynh/issues>
## Información para desarrolladores
Por favor enviar sus correcciones a la [rama `testing`](https://github.com/YunoHost-Apps/my_idlers_ynh/tree/testing).
Para probar la rama `testing`, sigue asÍ:
```bash
sudo yunohost app install https://github.com/YunoHost-Apps/my_idlers_ynh/tree/testing --debug
o
sudo yunohost app upgrade my_idlers -u https://github.com/YunoHost-Apps/my_idlers_ynh/tree/testing --debug
```
**Mas informaciones sobre el empaquetado de aplicaciones:** <https://yunohost.org/packaging_apps>

View file

@ -1,73 +0,0 @@
<!--
Ohart ongi: README hau automatikoki sortu da <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>ri esker
EZ editatu eskuz.
-->
# My Idlers YunoHost-erako
[![Integrazio maila](https://apps.yunohost.org/badge/integration/my_idlers)](https://ci-apps.yunohost.org/ci/apps/my_idlers/)
![Funtzionamendu egoera](https://apps.yunohost.org/badge/state/my_idlers)
![Mantentze egoera](https://apps.yunohost.org/badge/maintained/my_idlers)
[![Instalatu My Idlers YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=my_idlers)
*[Irakurri README hau beste hizkuntzatan.](./ALL_README.md)*
> *Pakete honek My Idlers YunoHost zerbitzari batean azkar eta zailtasunik gabe instalatzea ahalbidetzen dizu.*
> *YunoHost ez baduzu, kontsultatu [gida](https://yunohost.org/install) nola instalatu ikasteko.*
## Aurreikuspena
If you are the person in your family, group of friends or colleauges that manages the servers, domain names, online accounts and other hosted services, than this app is for you.
My Idlers is a useful register for keeping track of your servers and online hosting accounts.
It is a single-user app; if more than one person wants to use this functionality, it needs to be installed multiple times.
Besides that, for now, it needs a (sub)domain for itself.
This is my first app packaging attempt; there may be some rough edges.
What works:
* installing the app and using its features
* uninstalling
* backup
* moving the app to another domain
What does not (yet?) work or is untested:
* installing the app in subfolder
* LDAP integration
* restore from backup
* API access
![Screenshot of My Idlers](./doc/screenshots/my_idlers.jpg)
**Paketatutako bertsioa:** 3.0~ynh1
**Demoa:** <https://demo.myidlers.com/login>
## Pantaila-argazkiak
![My Idlers(r)en pantaila-argazkia](./doc/screenshots/example.jpg)
![My Idlers(r)en pantaila-argazkia](./doc/screenshots/my_idlers.jpg)
## Dokumentazioa eta baliabideak
- Erabiltzaileen dokumentazio ofiziala: <https://lowendspirit.com/discussion/2449/my-idlers-self-hosted-web-app-for-your-servers-shared-hosting-and-domains-information/>
- Jatorrizko aplikazioaren kode-gordailua: <https://github.com/cp6/my-idlers#install>
- YunoHost Denda: <https://apps.yunohost.org/app/my_idlers>
- Eman errore baten berri: <https://github.com/YunoHost-Apps/my_idlers_ynh/issues>
## Garatzaileentzako informazioa
Bidali `pull request`a [`testing` abarrera](https://github.com/YunoHost-Apps/my_idlers_ynh/tree/testing).
`testing` abarra probatzeko, ondorengoa egin:
```bash
sudo yunohost app install https://github.com/YunoHost-Apps/my_idlers_ynh/tree/testing --debug
edo
sudo yunohost app upgrade my_idlers -u https://github.com/YunoHost-Apps/my_idlers_ynh/tree/testing --debug
```
**Informazio gehiago aplikazioaren paketatzeari buruz:** <https://yunohost.org/packaging_apps>

View file

@ -1,75 +1,73 @@
<!--
Nota bene: ce README est automatiquement généré par <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
Il NE doit PAS être modifié à la main.
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator
It shall NOT be edited by hand.
-->
# My Idlers pour YunoHost
# Exemple d'app pour YunoHost
[![Niveau dintégration](https://apps.yunohost.org/badge/integration/my_idlers)](https://ci-apps.yunohost.org/ci/apps/my_idlers/)
![Statut du fonctionnement](https://apps.yunohost.org/badge/state/my_idlers)
![Statut de maintenance](https://apps.yunohost.org/badge/maintained/my_idlers)
[![Niveau d'intégration](https://dash.yunohost.org/integration/example.svg)](https://dash.yunohost.org/appci/app/example) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/example.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/example.maintain.svg)
[![Installer Example app avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=example)
[![Installer My Idlers avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=my_idlers)
*[Read this readme in english.](./README.md)*
*[Lire le README dans d'autres langues.](./ALL_README.md)*
> *Ce package vous permet d'installer Example app rapidement et simplement sur un serveur YunoHost.
Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.*
> *Ce package vous permet dinstaller My Idlers rapidement et simplement sur un serveur YunoHost.*
> *Si vous navez pas YunoHost, consultez [ce guide](https://yunohost.org/install) pour savoir comment linstaller et en profiter.*
## Vue d'ensemble
## Vue densemble
Some long and extensive description of what the app is and does, lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
(machine translate from English)
### Features
Si vous êtes la personne de votre famille, de votre groupe d'amis ou de vos collègues qui gère les serveurs, les noms de domaine, les comptes en ligne et d'autres services hébergés, alors cette application est faite pour vous.
My Idlers est un registre utile pour suivre vos serveurs et vos comptes d'hébergement en ligne.
C'est une application monoposte; si plusieurs personnes veulent utiliser cette fonctionnalité, il faut l'installer plusieurs fois. De plus, pour l'instant, elle nécessite un (sous-)domaine dédié.
Il s'agit de ma première tentative d'emballage d'application; il peut y avoir quelques imperfections.
Ce qui fonctionne :
* installation de l'application et utilisation de ses fonctionnalités
* désinstallation
* sauvegarde
* déplacement de l'application vers un autre domaine
Ce qui ne fonctionne pas (encore) ou n'est pas testé :
* installation de l'application dans un sous-dossier
* intégration LDAP
* restauration à partir d'une sauvegarde
* accès API
- Ut enim ad minim veniam, quis nostrud exercitation ullamco ;
- Laboris nisi ut aliquip ex ea commodo consequat ;
- Duis aute irure dolor in reprehenderit in voluptate ;
- Velit esse cillum dolore eu fugiat nulla pariatur ;
- Excepteur sint occaecat cupidatat non proident, sunt in culpa."
![Screenshot of My Idlers](./doc/screenshots/my_idlers.jpg)
**Version incluse :** 1.0~ynh1
**Démo :** https://demo.example.com
**Version incluse:** 3.0~ynh1
## Captures d'écran
**Démo:** <https://demo.myidlers.com/login>
![Capture d'écran de Example app](./doc/screenshots/example.jpg)
## Captures décran
## Avertissements / informations importantes
![Capture décran de My Idlers](./doc/screenshots/example.jpg)
![Capture décran de My Idlers](./doc/screenshots/my_idlers.jpg)
* Any known limitations, constrains or stuff not working, such as (but not limited to):
* requiring a full dedicated domain ?
* architectures not supported ?
* not-working single-sign on or LDAP integration ?
* the app requires an important amount of RAM / disk / .. to install or to work properly
* etc...
* Other infos that people should be aware of, such as:
* any specific step to perform after installing (such as manually finishing the install, specific admin credentials, ...)
* how to configure / administrate the application if it ain't obvious
* upgrade process / specificities / things to be aware of ?
* security considerations ?
## Documentations et ressources
- Documentation officielle utilisateur: <https://lowendspirit.com/discussion/2449/my-idlers-self-hosted-web-app-for-your-servers-shared-hosting-and-domains-information/>
- Dépôt de code officiel de lapp: <https://github.com/cp6/my-idlers#install>
- YunoHost Store: <https://apps.yunohost.org/app/my_idlers>
- Signaler un bug: <https://github.com/YunoHost-Apps/my_idlers_ynh/issues>
* Site officiel de l'app : <https://example.com>
* Documentation officielle utilisateur : <https://yunohost.org/apps>
* Documentation officielle de l'admin : <https://yunohost.org/packaging_apps>
* Dépôt de code officiel de l'app : <https://some.forge.com/example/example>
* Documentation YunoHost pour cette app : <https://yunohost.org/app_example>
* Signaler un bug : <https://github.com/YunoHost-Apps/example_ynh/issues>
## Informations pour les développeurs
Merci de faire vos pull request sur la [branche `testing`](https://github.com/YunoHost-Apps/my_idlers_ynh/tree/testing).
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/example_ynh/tree/testing).
Pour essayer la branche `testing`, procédez comme suit:
Pour essayer la branche testing, procédez comme suit.
```bash
sudo yunohost app install https://github.com/YunoHost-Apps/my_idlers_ynh/tree/testing --debug
``` bash
sudo yunohost app install https://github.com/YunoHost-Apps/example_ynh/tree/testing --debug
ou
sudo yunohost app upgrade my_idlers -u https://github.com/YunoHost-Apps/my_idlers_ynh/tree/testing --debug
sudo yunohost app upgrade example -u https://github.com/YunoHost-Apps/example_ynh/tree/testing --debug
```
**Plus dinfos sur le packaging dapplications:** <https://yunohost.org/packaging_apps>
**Plus d'infos sur le packaging d'applications :** <https://yunohost.org/packaging_apps>

View file

@ -1,73 +0,0 @@
<!--
NOTA: Este README foi creado automáticamente por <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
NON debe editarse manualmente.
-->
# My Idlers para YunoHost
[![Nivel de integración](https://apps.yunohost.org/badge/integration/my_idlers)](https://ci-apps.yunohost.org/ci/apps/my_idlers/)
![Estado de funcionamento](https://apps.yunohost.org/badge/state/my_idlers)
![Estado de mantemento](https://apps.yunohost.org/badge/maintained/my_idlers)
[![Instalar My Idlers con YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=my_idlers)
*[Le este README en outros idiomas.](./ALL_README.md)*
> *Este paquete permíteche instalar My Idlers de xeito rápido e doado nun servidor YunoHost.*
> *Se non usas YunoHost, le a [documentación](https://yunohost.org/install) para saber como instalalo.*
## Vista xeral
If you are the person in your family, group of friends or colleauges that manages the servers, domain names, online accounts and other hosted services, than this app is for you.
My Idlers is a useful register for keeping track of your servers and online hosting accounts.
It is a single-user app; if more than one person wants to use this functionality, it needs to be installed multiple times.
Besides that, for now, it needs a (sub)domain for itself.
This is my first app packaging attempt; there may be some rough edges.
What works:
* installing the app and using its features
* uninstalling
* backup
* moving the app to another domain
What does not (yet?) work or is untested:
* installing the app in subfolder
* LDAP integration
* restore from backup
* API access
![Screenshot of My Idlers](./doc/screenshots/my_idlers.jpg)
**Versión proporcionada:** 3.0~ynh1
**Demo:** <https://demo.myidlers.com/login>
## Capturas de pantalla
![Captura de pantalla de My Idlers](./doc/screenshots/example.jpg)
![Captura de pantalla de My Idlers](./doc/screenshots/my_idlers.jpg)
## Documentación e recursos
- Documentación oficial para usuarias: <https://lowendspirit.com/discussion/2449/my-idlers-self-hosted-web-app-for-your-servers-shared-hosting-and-domains-information/>
- Repositorio de orixe do código: <https://github.com/cp6/my-idlers#install>
- Tenda YunoHost: <https://apps.yunohost.org/app/my_idlers>
- Informar dun problema: <https://github.com/YunoHost-Apps/my_idlers_ynh/issues>
## Info de desenvolvemento
Envía a túa colaboración á [rama `testing`](https://github.com/YunoHost-Apps/my_idlers_ynh/tree/testing).
Para probar a rama `testing`, procede deste xeito:
```bash
sudo yunohost app install https://github.com/YunoHost-Apps/my_idlers_ynh/tree/testing --debug
ou
sudo yunohost app upgrade my_idlers -u https://github.com/YunoHost-Apps/my_idlers_ynh/tree/testing --debug
```
**Máis info sobre o empaquetado da app:** <https://yunohost.org/packaging_apps>

View file

@ -1,73 +0,0 @@
<!--
N.B.: README ini dibuat secara otomatis oleh <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
Ini TIDAK boleh diedit dengan tangan.
-->
# My Idlers untuk YunoHost
[![Tingkat integrasi](https://apps.yunohost.org/badge/integration/my_idlers)](https://ci-apps.yunohost.org/ci/apps/my_idlers/)
![Status kerja](https://apps.yunohost.org/badge/state/my_idlers)
![Status pemeliharaan](https://apps.yunohost.org/badge/maintained/my_idlers)
[![Pasang My Idlers dengan YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=my_idlers)
*[Baca README ini dengan bahasa yang lain.](./ALL_README.md)*
> *Paket ini memperbolehkan Anda untuk memasang My Idlers secara cepat dan mudah pada server YunoHost.*
> *Bila Anda tidak mempunyai YunoHost, silakan berkonsultasi dengan [panduan](https://yunohost.org/install) untuk mempelajari bagaimana untuk memasangnya.*
## Ringkasan
If you are the person in your family, group of friends or colleauges that manages the servers, domain names, online accounts and other hosted services, than this app is for you.
My Idlers is a useful register for keeping track of your servers and online hosting accounts.
It is a single-user app; if more than one person wants to use this functionality, it needs to be installed multiple times.
Besides that, for now, it needs a (sub)domain for itself.
This is my first app packaging attempt; there may be some rough edges.
What works:
* installing the app and using its features
* uninstalling
* backup
* moving the app to another domain
What does not (yet?) work or is untested:
* installing the app in subfolder
* LDAP integration
* restore from backup
* API access
![Screenshot of My Idlers](./doc/screenshots/my_idlers.jpg)
**Versi terkirim:** 3.0~ynh1
**Demo:** <https://demo.myidlers.com/login>
## Tangkapan Layar
![Tangkapan Layar pada My Idlers](./doc/screenshots/example.jpg)
![Tangkapan Layar pada My Idlers](./doc/screenshots/my_idlers.jpg)
## Dokumentasi dan sumber daya
- Dokumentasi pengguna resmi: <https://lowendspirit.com/discussion/2449/my-idlers-self-hosted-web-app-for-your-servers-shared-hosting-and-domains-information/>
- Depot kode aplikasi hulu: <https://github.com/cp6/my-idlers#install>
- Gudang YunoHost: <https://apps.yunohost.org/app/my_idlers>
- Laporkan bug: <https://github.com/YunoHost-Apps/my_idlers_ynh/issues>
## Info developer
Silakan kirim pull request ke [`testing` branch](https://github.com/YunoHost-Apps/my_idlers_ynh/tree/testing).
Untuk mencoba branch `testing`, silakan dilanjutkan seperti:
```bash
sudo yunohost app install https://github.com/YunoHost-Apps/my_idlers_ynh/tree/testing --debug
atau
sudo yunohost app upgrade my_idlers -u https://github.com/YunoHost-Apps/my_idlers_ynh/tree/testing --debug
```
**Info lebih lanjut mengenai pemaketan aplikasi:** <https://yunohost.org/packaging_apps>

View file

@ -1,73 +0,0 @@
<!--
NB: Deze README is automatisch gegenereerd door <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
Hij mag NIET handmatig aangepast worden.
-->
# My Idlers voor Yunohost
[![Integratieniveau](https://apps.yunohost.org/badge/integration/my_idlers)](https://ci-apps.yunohost.org/ci/apps/my_idlers/)
![Mate van functioneren](https://apps.yunohost.org/badge/state/my_idlers)
![Onderhoudsstatus](https://apps.yunohost.org/badge/maintained/my_idlers)
[![My Idlers met Yunohost installeren](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=my_idlers)
*[Deze README in een andere taal lezen.](./ALL_README.md)*
> *Met dit pakket kun je My Idlers snel en eenvoudig op een YunoHost-server installeren.*
> *Als je nog geen YunoHost hebt, lees dan [de installatiehandleiding](https://yunohost.org/install), om te zien hoe je 'm installeert.*
## Overzicht
If you are the person in your family, group of friends or colleauges that manages the servers, domain names, online accounts and other hosted services, than this app is for you.
My Idlers is a useful register for keeping track of your servers and online hosting accounts.
It is a single-user app; if more than one person wants to use this functionality, it needs to be installed multiple times.
Besides that, for now, it needs a (sub)domain for itself.
This is my first app packaging attempt; there may be some rough edges.
What works:
* installing the app and using its features
* uninstalling
* backup
* moving the app to another domain
What does not (yet?) work or is untested:
* installing the app in subfolder
* LDAP integration
* restore from backup
* API access
![Screenshot of My Idlers](./doc/screenshots/my_idlers.jpg)
**Geleverde versie:** 3.0~ynh1
**Demo:** <https://demo.myidlers.com/login>
## Schermafdrukken
![Schermafdrukken van My Idlers](./doc/screenshots/example.jpg)
![Schermafdrukken van My Idlers](./doc/screenshots/my_idlers.jpg)
## Documentatie en bronnen
- Officiele gebruikersdocumentatie: <https://lowendspirit.com/discussion/2449/my-idlers-self-hosted-web-app-for-your-servers-shared-hosting-and-domains-information/>
- Upstream app codedepot: <https://github.com/cp6/my-idlers#install>
- YunoHost-store: <https://apps.yunohost.org/app/my_idlers>
- Meld een bug: <https://github.com/YunoHost-Apps/my_idlers_ynh/issues>
## Ontwikkelaarsinformatie
Stuur je pull request alsjeblieft naar de [`testing`-branch](https://github.com/YunoHost-Apps/my_idlers_ynh/tree/testing).
Om de `testing`-branch uit te proberen, ga als volgt te werk:
```bash
sudo yunohost app install https://github.com/YunoHost-Apps/my_idlers_ynh/tree/testing --debug
of
sudo yunohost app upgrade my_idlers -u https://github.com/YunoHost-Apps/my_idlers_ynh/tree/testing --debug
```
**Verdere informatie over app-packaging:** <https://yunohost.org/packaging_apps>

View file

@ -1,73 +0,0 @@
<!--
To README zostało automatycznie wygenerowane przez <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
Nie powinno być ono edytowane ręcznie.
-->
# My Idlers dla YunoHost
[![Poziom integracji](https://apps.yunohost.org/badge/integration/my_idlers)](https://ci-apps.yunohost.org/ci/apps/my_idlers/)
![Status działania](https://apps.yunohost.org/badge/state/my_idlers)
![Status utrzymania](https://apps.yunohost.org/badge/maintained/my_idlers)
[![Zainstaluj My Idlers z YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=my_idlers)
*[Przeczytaj plik README w innym języku.](./ALL_README.md)*
> *Ta aplikacja pozwala na szybką i prostą instalację My Idlers na serwerze YunoHost.*
> *Jeżeli nie masz YunoHost zapoznaj się z [poradnikiem](https://yunohost.org/install) instalacji.*
## Przegląd
If you are the person in your family, group of friends or colleauges that manages the servers, domain names, online accounts and other hosted services, than this app is for you.
My Idlers is a useful register for keeping track of your servers and online hosting accounts.
It is a single-user app; if more than one person wants to use this functionality, it needs to be installed multiple times.
Besides that, for now, it needs a (sub)domain for itself.
This is my first app packaging attempt; there may be some rough edges.
What works:
* installing the app and using its features
* uninstalling
* backup
* moving the app to another domain
What does not (yet?) work or is untested:
* installing the app in subfolder
* LDAP integration
* restore from backup
* API access
![Screenshot of My Idlers](./doc/screenshots/my_idlers.jpg)
**Dostarczona wersja:** 3.0~ynh1
**Demo:** <https://demo.myidlers.com/login>
## Zrzuty ekranu
![Zrzut ekranu z My Idlers](./doc/screenshots/example.jpg)
![Zrzut ekranu z My Idlers](./doc/screenshots/my_idlers.jpg)
## Dokumentacja i zasoby
- Oficjalna dokumentacja: <https://lowendspirit.com/discussion/2449/my-idlers-self-hosted-web-app-for-your-servers-shared-hosting-and-domains-information/>
- Repozytorium z kodem źródłowym: <https://github.com/cp6/my-idlers#install>
- Sklep YunoHost: <https://apps.yunohost.org/app/my_idlers>
- Zgłaszanie błędów: <https://github.com/YunoHost-Apps/my_idlers_ynh/issues>
## Informacje od twórców
Wyślij swój pull request do [gałęzi `testing`](https://github.com/YunoHost-Apps/my_idlers_ynh/tree/testing).
Aby wypróbować gałąź `testing` postępuj zgodnie z instrukcjami:
```bash
sudo yunohost app install https://github.com/YunoHost-Apps/my_idlers_ynh/tree/testing --debug
lub
sudo yunohost app upgrade my_idlers -u https://github.com/YunoHost-Apps/my_idlers_ynh/tree/testing --debug
```
**Więcej informacji o tworzeniu paczek aplikacji:** <https://yunohost.org/packaging_apps>

View file

@ -1,73 +0,0 @@
<!--
Важно: этот README был автоматически сгенерирован <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
Он НЕ ДОЛЖЕН редактироваться вручную.
-->
# My Idlers для YunoHost
[![Уровень интеграции](https://apps.yunohost.org/badge/integration/my_idlers)](https://ci-apps.yunohost.org/ci/apps/my_idlers/)
![Состояние работы](https://apps.yunohost.org/badge/state/my_idlers)
![Состояние сопровождения](https://apps.yunohost.org/badge/maintained/my_idlers)
[![Установите My Idlers с YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=my_idlers)
*[Прочтите этот README на других языках.](./ALL_README.md)*
> *Этот пакет позволяет Вам установить My Idlers быстро и просто на YunoHost-сервер.*
> *Если у Вас нет YunoHost, пожалуйста, посмотрите [инструкцию](https://yunohost.org/install), чтобы узнать, как установить его.*
## Обзор
If you are the person in your family, group of friends or colleauges that manages the servers, domain names, online accounts and other hosted services, than this app is for you.
My Idlers is a useful register for keeping track of your servers and online hosting accounts.
It is a single-user app; if more than one person wants to use this functionality, it needs to be installed multiple times.
Besides that, for now, it needs a (sub)domain for itself.
This is my first app packaging attempt; there may be some rough edges.
What works:
* installing the app and using its features
* uninstalling
* backup
* moving the app to another domain
What does not (yet?) work or is untested:
* installing the app in subfolder
* LDAP integration
* restore from backup
* API access
![Screenshot of My Idlers](./doc/screenshots/my_idlers.jpg)
**Поставляемая версия:** 3.0~ynh1
**Демо-версия:** <https://demo.myidlers.com/login>
## Снимки экрана
![Снимок экрана My Idlers](./doc/screenshots/example.jpg)
![Снимок экрана My Idlers](./doc/screenshots/my_idlers.jpg)
## Документация и ресурсы
- Официальная документация пользователя: <https://lowendspirit.com/discussion/2449/my-idlers-self-hosted-web-app-for-your-servers-shared-hosting-and-domains-information/>
- Репозиторий кода главной ветки приложения: <https://github.com/cp6/my-idlers#install>
- Магазин YunoHost: <https://apps.yunohost.org/app/my_idlers>
- Сообщите об ошибке: <https://github.com/YunoHost-Apps/my_idlers_ynh/issues>
## Информация для разработчиков
Пришлите Ваш запрос на слияние в [ветку `testing`](https://github.com/YunoHost-Apps/my_idlers_ynh/tree/testing).
Чтобы попробовать ветку `testing`, пожалуйста, сделайте что-то вроде этого:
```bash
sudo yunohost app install https://github.com/YunoHost-Apps/my_idlers_ynh/tree/testing --debug
или
sudo yunohost app upgrade my_idlers -u https://github.com/YunoHost-Apps/my_idlers_ynh/tree/testing --debug
```
**Больше информации о пакетировании приложений:** <https://yunohost.org/packaging_apps>

View file

@ -1,73 +0,0 @@
<!--
注意:此 README 由 <https://github.com/YunoHost/apps/tree/master/tools/readme_generator> 自动生成
请勿手动编辑。
-->
# YunoHost 上的 My Idlers
[![集成程度](https://apps.yunohost.org/badge/integration/my_idlers)](https://ci-apps.yunohost.org/ci/apps/my_idlers/)
![工作状态](https://apps.yunohost.org/badge/state/my_idlers)
![维护状态](https://apps.yunohost.org/badge/maintained/my_idlers)
[![使用 YunoHost 安装 My Idlers](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=my_idlers)
*[阅读此 README 的其它语言版本。](./ALL_README.md)*
> *通过此软件包,您可以在 YunoHost 服务器上快速、简单地安装 My Idlers。*
> *如果您还没有 YunoHost请参阅[指南](https://yunohost.org/install)了解如何安装它。*
## 概况
If you are the person in your family, group of friends or colleauges that manages the servers, domain names, online accounts and other hosted services, than this app is for you.
My Idlers is a useful register for keeping track of your servers and online hosting accounts.
It is a single-user app; if more than one person wants to use this functionality, it needs to be installed multiple times.
Besides that, for now, it needs a (sub)domain for itself.
This is my first app packaging attempt; there may be some rough edges.
What works:
* installing the app and using its features
* uninstalling
* backup
* moving the app to another domain
What does not (yet?) work or is untested:
* installing the app in subfolder
* LDAP integration
* restore from backup
* API access
![Screenshot of My Idlers](./doc/screenshots/my_idlers.jpg)
**分发版本:** 3.0~ynh1
**演示:** <https://demo.myidlers.com/login>
## 截图
![My Idlers 的截图](./doc/screenshots/example.jpg)
![My Idlers 的截图](./doc/screenshots/my_idlers.jpg)
## 文档与资源
- 官方用户文档: <https://lowendspirit.com/discussion/2449/my-idlers-self-hosted-web-app-for-your-servers-shared-hosting-and-domains-information/>
- 上游应用代码库: <https://github.com/cp6/my-idlers#install>
- YunoHost 商店: <https://apps.yunohost.org/app/my_idlers>
- 报告 bug <https://github.com/YunoHost-Apps/my_idlers_ynh/issues>
## 开发者信息
请向 [`testing` 分支](https://github.com/YunoHost-Apps/my_idlers_ynh/tree/testing) 发送拉取请求。
如要尝试 `testing` 分支,请这样操作:
```bash
sudo yunohost app install https://github.com/YunoHost-Apps/my_idlers_ynh/tree/testing --debug
sudo yunohost app upgrade my_idlers -u https://github.com/YunoHost-Apps/my_idlers_ynh/tree/testing --debug
```
**有关应用打包的更多信息:** <https://yunohost.org/packaging_apps>

View file

@ -1,15 +0,0 @@
APP_NAME="My Idlers"
APP_ENV=production
APP_KEY=
APP_DEBUG=false
APP_URL=https://__DOMAIN__
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=__DB_NAME__
DB_USERNAME=__DB_USER__
DB_PASSWORD=__DB_PWD__
DB_LOG_SQL=false

4
conf/extra_php-fpm.conf Normal file
View file

@ -0,0 +1,4 @@
; Additional php.ini defines, specific to this pool of workers.
php_admin_value[upload_max_filesize] = 50M
php_admin_value[post_max_size] = 50M

View file

@ -1,20 +1,28 @@
location / {
root __INSTALL_DIR__/public;
try_files $uri $uri/ /index.php?$query_string;
index index.html index.htm index.php;
}
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__/ {
# Path to source
alias __INSTALL_DIR__/;
### Example PHP configuration (remove it if not used)
index index.php;
# Common parameter to increase upload size limit in conjunction with dedicated php-fpm file
# client_max_body_size 50M;
try_files $uri $uri/ index.php;
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock;
location ~ \.php$ {
root __INSTALL_DIR__/public;
index index.html index.htm index.php;
fastcgi_pass unix:/var/run/php/php__PHP_VERSION__-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
fastcgi_param REMOTE_USER $remote_user;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $request_filename;
}
### End of PHP configuration part
location ~ /\.(?!well-known).* {
deny all;
# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;
}

49
conf/systemd.service Normal file
View file

@ -0,0 +1,49 @@
[Unit]
Description=Small description of the service
After=network.target
[Service]
Type=simple
User=__APP__
Group=__APP__
WorkingDirectory=__INSTALL_DIR__/
ExecStart=__INSTALL_DIR__/script
StandardOutput=append:/var/log/__APP__/__APP__.log
StandardError=inherit
### Depending on specificities of your service/app, you may need to tweak these
### .. but this should be a good baseline
# Sandboxing options to harden security
# Details for these options: https://www.freedesktop.org/software/systemd/man/systemd.exec.html
NoNewPrivileges=yes
PrivateTmp=yes
PrivateDevices=yes
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_NETLINK
RestrictNamespaces=yes
RestrictRealtime=yes
DevicePolicy=closed
ProtectClock=yes
ProtectHostname=yes
ProtectProc=invisible
ProtectSystem=full
ProtectControlGroups=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
LockPersonality=yes
SystemCallArchitectures=native
SystemCallFilter=~@clock @debug @module @mount @obsolete @reboot @setuid @swap @cpu-emulation @privileged
# Denying access to capabilities that should not be relevant for webapps
# Doc: https://man7.org/linux/man-pages/man7/capabilities.7.html
CapabilityBoundingSet=~CAP_RAWIO CAP_MKNOD
CapabilityBoundingSet=~CAP_AUDIT_CONTROL CAP_AUDIT_READ CAP_AUDIT_WRITE
CapabilityBoundingSet=~CAP_SYS_BOOT CAP_SYS_TIME CAP_SYS_MODULE CAP_SYS_PACCT
CapabilityBoundingSet=~CAP_LEASE CAP_LINUX_IMMUTABLE CAP_IPC_LOCK
CapabilityBoundingSet=~CAP_BLOCK_SUSPEND CAP_WAKE_ALARM
CapabilityBoundingSet=~CAP_SYS_TTY_CONFIG
CapabilityBoundingSet=~CAP_MAC_ADMIN CAP_MAC_OVERRIDE
CapabilityBoundingSet=~CAP_NET_ADMIN CAP_NET_BROADCAST CAP_NET_RAW
CapabilityBoundingSet=~CAP_SYS_ADMIN CAP_SYS_PTRACE CAP_SYSLOG
[Install]
WantedBy=multi-user.target

View file

@ -1,4 +1,3 @@
#:schema https://github.com/YunoHost/apps/raw/master/schemas/config_panel.v1.schema.json
## Config panel are available from webadmin > Apps > YOUR_APP > Config Panel Button
## Those panels let user configure some params on their apps using a friendly interface,

View file

@ -1,22 +1 @@
If you are the person in your family, group of friends or colleauges that manages the servers, domain names, online accounts and other hosted services, than this app is for you.
My Idlers is a useful register for keeping track of your servers and online hosting accounts.
It is a single-user app; if more than one person wants to use this functionality, it needs to be installed multiple times.
Besides that, for now, it needs a (sub)domain for itself.
This is my first app packaging attempt; there may be some rough edges.
What works:
* installing the app and using its features
* uninstalling
* backup
* moving the app to another domain
What does not (yet?) work or is untested:
* installing the app in subfolder
* LDAP integration
* restore from backup
* API access
![Screenshot of My Idlers](./doc/screenshots/my_idlers.jpg)
This is a dummy description of this app features

View file

@ -1,24 +1 @@
(machine translate from English)
Si vous êtes la personne de votre famille, de votre groupe d'amis ou de vos collègues qui gère les serveurs, les noms de domaine, les comptes en ligne et d'autres services hébergés, alors cette application est faite pour vous.
My Idlers est un registre utile pour suivre vos serveurs et vos comptes d'hébergement en ligne.
C'est une application monoposte; si plusieurs personnes veulent utiliser cette fonctionnalité, il faut l'installer plusieurs fois. De plus, pour l'instant, elle nécessite un (sous-)domaine dédié.
Il s'agit de ma première tentative d'emballage d'application; il peut y avoir quelques imperfections.
Ce qui fonctionne :
* installation de l'application et utilisation de ses fonctionnalités
* désinstallation
* sauvegarde
* déplacement de l'application vers un autre domaine
Ce qui ne fonctionne pas (encore) ou n'est pas testé :
* installation de l'application dans un sous-dossier
* intégration LDAP
* restauration à partir d'une sauvegarde
* accès API
![Screenshot of My Idlers](./doc/screenshots/my_idlers.jpg)
Ceci est une fausse description des fonctionalités de l'app

View file

@ -1,7 +1,7 @@
This is a dummy disclaimer to display after the install
The app url is <https://__DOMAIN____PATH__>
The app install dir is `__INSTALL_DIR__`
The app id is `__ID__`
There was an attempt to create a user with the credentials you provided. Please open the app to log in. If presented with a "registration" page instead of "login", please create an account yourself. Either way, the account will unfortunately not be synchronized with Yunohost users.

View file

@ -1,3 +1 @@
For now, only the domain and group can be set.
After installation, visit the app to create an account. As this is a single-user app, the registration page will not be available after that anymore.
This is a dummy disclaimer to display prior to the install

View file

@ -1,3 +1 @@
Pour l'instant, seuls le domaine et le groupe peuvent être définis.
Après l'installation, visitez l'application pour créer un compte. Comme il s'agit d'une application monoposte, la page de création de compte ne sera plus disponible par la suite.
Ceci est un faux disclaimer à présenter avant l'installation

Binary file not shown.

Before

Width:  |  Height:  |  Size: 319 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 319 KiB

View file

@ -2,80 +2,134 @@
packaging_format = 2
id = "my_idlers"
name = "My Idlers"
description.en = "A self-hosted web app for displaying, organizing and storing information about your servers (VPS/Dedi), shared & reseller hosting, seedboxes, domains, DNS and misc services. Are you the person in your family, group of friends or at work who keeps an eye on everyones Yunohosts, then this is the app to help you."
description.fr = "Une application Web auto-hébergée pour afficher, organiser et stocker des informations sur vos serveurs (VPS/Dedi), votre hébergement partagé et revendeur, vos seedboxes, vos domaines, vos DNS et divers services."
id = "example"
name = "Example app"
description.en = "Explain in *a few (10~15) words* the purpose of the app or what it actually does (it is meant to give a rough idea to users browsing a catalog of 100+ apps)"
description.fr = "Expliquez en *quelques* (10~15) mots l'utilité de l'app ou ce qu'elle fait (l'objectif est de donner une idée grossière pour des utilisateurs qui naviguent dans un catalogue de 100+ apps)"
version = "3.0~ynh1"
version = "1.0~ynh1"
maintainers = ["wbk"]
maintainers = ["johndoe"]
[upstream]
license = "MIT"
demo = "https://demo.myidlers.com/login"
userdoc = "https://lowendspirit.com/discussion/2449/my-idlers-self-hosted-web-app-for-your-servers-shared-hosting-and-domains-information/"
code = "https://github.com/cp6/my-idlers#install"
# NB: Only the "license" key is mandatory. Remove entries for which there's no relevant data
license = "free" # you can see the available licenses identifiers list here: https://spdx.org/licenses/
website = "https://example.com"
demo = "https://demo.example.com"
admindoc = "https://yunohost.org/packaging_apps"
userdoc = "https://yunohost.org/apps"
code = "https://some.forge.com/example/example"
# FIXME: optional but recommended if relevant, this is meant to contain the Common Platform Enumeration, which is
# sort of a standard id for applications defined by the NIST. In particular, YunoHost may use this is in the future
# to easily track CVE (=security reports) related to apps. The CPE may be obtained by searching here:
# https://nvd.nist.gov/products/cpe/search.
# For example, for Nextcloud, the CPE is 'cpe:2.3:a:nextcloud:nextcloud' (no need to include the version number)
cpe = "???"
# FIXME: optional but recommended (or remove if irrelevant / not applicable).
# This is meant to be an URL where people can financially support this app, especially when its development is based
# on volunteers and/or financed by its community. YunoHost may later advertise it in the webadmin.
fund = "???"
[integration]
yunohost = ">= 12.0.9"
helpers_version = "2.1"
architectures = "all"
multi_instance = true
yunohost = ">= 11.2"
# FIXME: can be replaced by a list of supported archs using the dpkg --print-architecture nomenclature (amd64/i386/armhf/arm64), for example: ["amd64", "i386"]
architectures = "all"
multi_instance = true
#try whether integration is possible later on
ldap = "false"
sso = "false"
# FIXME: replace with true, false, or "not_relevant".
# Not to confuse with the "sso" key: the "ldap" key corresponds to wether or not a user *can* login on the app using
# its YunoHost credentials.
ldap = "?"
disk = "100M"
ram.build = "150M"
ram.runtime = "100M"
# FIXME: replace with true, false, or "not_relevant".
# Not to confuse with the "ldap" key: the "sso" key corresponds to wether or not a user is *automatically logged-in*
# on the app when logged-in on the YunoHost portal.
sso = "?"
# FIXME: replace with an **estimate** minimum disk and RAM requirements. e.g. 20M, 400M, 1G...
disk = "50M"
ram.build = "50M"
ram.runtime = "50M"
[install]
[install.domain]
# this is a generic question - ask strings are automatically handled by YunoHost's core
type = "domain"
# unable to get this to work, disable for now
#[install.path]
#type = "path"
#default = "/idlers"
[install.path]
# this is a generic question - ask strings are automatically handled by YunoHost's core
type = "path"
default = "/example"
[install.init_main_permission]
# this is a generic question - ask strings are automatically handled by YunoHost's core
# This won't be saved as setting and will instead be used to initialize the SSOwat permission
type = "group"
default = "all_users"
[install.user]
help.en = "The name of the user"
type = "string"
[install.email]
help.en = "The email address used for logging in to the application"
type = "email"
default = "visitors"
[install.language]
ask.en = "Choose the application language"
ask.fr = "Choisissez la langue de l'application"
type = "select"
choices = ["fr", "en"]
default = "fr"
[install.admin]
# this is a generic question - ask strings are automatically handled by YunoHost's core
type = "user"
[install.password]
# this is a generic question - ask strings are automatically handled by YunoHost's core
# Note that user-provided passwords questions are not automatically saved as setting
help.en = "Use the help field to add an information for the admin about this question."
help.fr = "Utilisez le champ aide pour ajouter une information à l'intention de l'administrateur à propos de cette question."
type = "password"
[resources]
# See the packaging documentation for the full set
# of explanation regarding the behavior and properties for each of those
[resources.sources]
[resources.sources.main]
# This will pre-fetch the asset
url = "https://github.com/cp6/my-idlers/archive/refs/tags/3.0.zip"
sha256 = "f92a6dc9c98ec1e3837939db571833d28e72b992f5a9611925e9d242fcb40f72"
# This will pre-fetch the asset which can then be deployed during the install/upgrade scripts with :
# ynh_setup_source --dest_dir="$install_dir"
# You can also define other assets than "main" and add --source_id="foobar" in the previous command
url = "https://github.com/foo/bar/archive/refs/tags/v1.2.3.tar.gz"
sha256 = "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
# These infos are used by https://github.com/YunoHost/apps/blob/master/tools/autoupdate_app_sources/autoupdate_app_sources.py
# to auto-update the previous asset urls and sha256sum + manifest version
# assuming the upstream's code repo is on github and relies on tags or releases
# See the 'sources' resource documentation for more details
# autoupdate.strategy = "latest_github_tag"
[resources.system_user]
user = "__APP_NAME__:rwx"
# This will provision/deprovision a unix system user
[resources.install_dir]
group = "www-data:r-x"
# This will create/remove the install dir as /var/www/$app
# and store the corresponding setting $install_dir
[resources.data_dir]
# This will create/remove the data dir as /home/yunohost.app/$app
# and store the corresponding setting $data_dir
[resources.permissions]
# This will configure SSOwat permission for $domain/$path/
# The initial allowed group of user is configured via the init_main_permission question (public=visitors, private=all_users)
main.url = "/"
[resources.ports]
# This will pick a random port for reverse-proxying and store it as the $port setting
[resources.apt]
packages = "php8.3, php8.3-cli, php8.3-mbstring, php8.3-xml, php8.3-mysql, php8.3-intl, php8.3-pdo, php8.3-intl, composer, mariadb-server, mariadb-client, php8.3-curl"
# This will automatically install/uninstall the following apt packages
# and implicitly define the $phpversion setting as 8.0 (if phpX.Y-foobar dependencies are listed)
packages = "mariadb-server, deb1, deb2, php8.0-foo, php8.0-bar"
[resources.database]
# This will automatically provision/deprovison a MySQL DB and store the corresponding credentials in settings $db_user, $db_name, $db_pwd
type = "mysql"

View file

@ -1,9 +1,17 @@
#!/bin/bash
#=================================================
# COMMON VARIABLES AND CUSTOM HELPERS
# COMMON VARIABLES
#=================================================
#=================================================
# PERSONAL HELPERS
#=================================================
#=================================================
# EXPERIMENTAL HELPERS
#=================================================
#=================================================
# FUTURE OFFICIAL HELPERS
#=================================================
composer_version="2.5.5"
php_version="8.3"
# will not stay stable over installs, should not be a problem
token=$(tr -dc A-Za-z0-9 </dev/urandom | head -c 60)

View file

@ -8,29 +8,73 @@
source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers
ynh_print_info "Declaring files to be backed up..."
#=================================================
# DECLARE DATA AND CONF FILES TO BACKUP
#=================================================
ynh_print_info --message="Declaring files to be backed up..."
### N.B. : the following 'ynh_backup' calls are only a *declaration* of what needs
### to be backuped and not an actual copy of any file. The actual backup that
### creates and fills the archive with the files happens in the core after this
### script is called. Hence ynh_backups calls take basically 0 seconds to run.
#=================================================
# BACKUP THE APP MAIN DIR
#=================================================
ynh_backup "$install_dir"
ynh_backup --src_path="$install_dir"
#=================================================
# BACKUP SYSTEM CONFIGURATION
# BACKUP THE DATA DIR
#=================================================
ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf"
### Only relevant if there is a "data_dir" resource for this app
ynh_backup --src_path="$data_dir" --is_big
#=================================================
# SYSTEM CONFIGURATION
#=================================================
# Backup the PHP-FPM configuration
ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
# Backup the nginx configuration
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
# Backup the systemd service unit
ynh_backup --src_path="/etc/systemd/system/$app.service"
# Backup the logrotate configuration
ynh_backup --src_path="/etc/logrotate.d/$app"
# Backup the Fail2Ban config
ynh_backup --src_path="/etc/fail2ban/jail.d/$app.conf"
ynh_backup --src_path="/etc/fail2ban/filter.d/$app.conf"
#=================================================
# BACKUP VARIOUS FILES
#=================================================
ynh_backup --src_path="/etc/cron.d/$app"
ynh_backup --src_path="/etc/$app/"
### For apps with huge logs, you might want to pass --is_big,
### and in restore script, mkdir and pass --not_mandatory to ynh_restore_file.
ynh_backup --src_path="/var/log/$app/"
#=================================================
# BACKUP THE MYSQL DATABASE
#=================================================
ynh_print_info "Backing up the MySQL database..."
ynh_print_info --message="Backing up the MySQL database..."
ynh_mysql_dump_db > db.sql
### (However, things like MySQL dumps *do* take some time to run, though the
### copy of the generated dump to the archive still happens later)
ynh_mysql_dump_db --database="$db_name" > db.sql
#=================================================
# END OF SCRIPT
#=================================================
ynh_print_info "Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."

View file

@ -1,5 +1,6 @@
#!/bin/bash
## this script is only run if actual change to domain/path is detected, if you're here either $domain or $path changed
## new location is available via $domain and $path (or $new_domain and $new_path variables if you want to be explicit)
## old values are available via, you guessed it, $old_domain and $old_path
@ -13,32 +14,33 @@ source /usr/share/yunohost/helpers
#=================================================
# STOP SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Stopping $app's systemd service..." --weight=1
## My Idlers runs as a Laravel app on nginx; keep nginx running, so no stop
ynh_systemd_action --service_name="$app" --action="stop" --log_path="/var/log/$app/$app.log"
#=================================================
# MODIFY URL IN NGINX CONF
#=================================================
ynh_script_progression "Updating NGINX web server configuration..."
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1
# this will most likely adjust NGINX config correctly
ynh_config_change_url_nginx
ynh_change_url_nginx_config
#=================================================
# SPECIFIC MODIFICATIONS
#=================================================
## Only the app_url in .env needs to change
sed -i -e 's/$old_domain/new_domain/g' $install_dir/.env
sed -i -e 's/$old_path/new_path/g' $install_dir/.env
## do any changes to files that reference specific installation domain/path, i.e. regenerate configs etc
## perhaps a better option than sed: ynh_replace + ynh_store_file_checksum; try it out later
# ynh_replace --match=$old_domain --replace="$new_domain --file="$install_dir/.env"
# ynh_replace --match=$old_path --replace="$new_path --file="$install_dir/.env"
ynh_store_file_checksum "$install_dir/.env"
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Starting $app's systemd service..." --weight=1
ynh_systemd_action --service_name="$app" --action="start" --log_path="/var/log/$app/$app.log"
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression "Change of URL completed for $app"
ynh_script_progression --message="Change of URL completed for $app" --last

99
scripts/config Normal file
View file

@ -0,0 +1,99 @@
#!/bin/bash
# In simple cases, you don't need a config script.
# With a simple config_panel.toml, you can write in the app settings, in the
# upstream config file or replace complete files (logo ...) and restart services.
# The config scripts allows you to go further, to handle specific cases
# (validation of several interdependent fields, specific getter/setter for a value,
# display dynamic informations or choices, pre-loading of config type .cube... ).
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source /usr/share/yunohost/helpers
ynh_abort_if_errors
#=================================================
# RETRIEVE ARGUMENTS
#=================================================
install_dir=$(ynh_app_setting_get --app="$app" --key=install_dir)
#=================================================
# SPECIFIC GETTERS FOR TOML SHORT KEY
#=================================================
get__amount() {
# Here we can imagine to have an API call to stripe to know the amount of donation during a month
local amount=200
# It's possible to change some properties of the question by overriding it:
if [ "$amount" -gt 100 ]; then
cat << EOF
style: success
value: $amount
ask:
en: A lot of donation this month: **$amount €**
EOF
else
cat << EOF
style: danger
value: $amount
ask:
en: Not so much donation this month: $amount €
EOF
fi
}
get__prices() {
local prices
prices="$(grep "DONATION\['" "$install_dir/settings.py" | sed -r "s@^DONATION\['([^']*)'\]\['([^']*)'\] = '([^']*)'@\1/\2/\3@g" | sed -z 's/\n/,/g;s/,$/\n/')"
if [ "$prices" == "," ]; then
# Return YNH_NULL if you prefer to not return a value at all.
echo YNH_NULL
else
echo "$prices"
fi
}
#=================================================
# SPECIFIC VALIDATORS FOR TOML SHORT KEYS
#=================================================
validate__publishable_key() {
# We can imagine here we test if the key is really a publishable key
(is_secret_key "$publishable_key") &&
echo 'This key seems to be a secret key'
}
#=================================================
# SPECIFIC SETTERS FOR TOML SHORT KEYS
#=================================================
set__prices() {
#---------------------------------------------
# IMPORTANT: setters are triggered only if a change is detected
#---------------------------------------------
for price in $(echo "$prices" | sed "s/,/ /"); do
frequency=$(echo "$price" | cut -d/ -f1)
currency=$(echo "$price" | cut -d/ -f2)
price_id=$(echo "$price" | cut -d/ -f3)
sed "d/DONATION\['$frequency'\]\['$currency'\]" "$install_dir/settings.py"
echo "DONATION['$frequency']['$currency'] = '$price_id'" >> "$install_dir/settings.py"
done
#---------------------------------------------
# IMPORTANT: to be able to upgrade properly, you have to save the value in settings too
#---------------------------------------------
ynh_app_setting_set --app="$app" --key=prices --value="$prices"
}
#=================================================
# GENERIC FINALIZATION
#=================================================
ynh_app_config_run "$1"

View file

@ -7,71 +7,189 @@
source _common.sh
source /usr/share/yunohost/helpers
### Install parameters are automatically saved as settings
###
### Settings are automatically loaded as bash variables
### in every app script context, therefore typically these will exist:
### - $domain
### - $path
### - $language
### ... etc
###
### Resources defined in the manifest are provisioned prior to this script
### and corresponding settings are also available, such as:
### - $install_dir
### - $port
### - $db_name
### ...
###
### $app is the app id (i.e. 'example' for first install,
### or 'example__2', '__3', ... for multi-instance installs)
#=================================================
# INITIALIZE AND STORE SETTINGS
#=================================================
# If you need to, you can define custom settings
# (or remove this section entirely if not relevant for you)
foo="bar"
ynh_app_setting_set --app=$app --key=foo --value=$foo
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_script_progression "Setting up source files..."
ynh_script_progression --message="Setting up source files..." --weight=1
### `ynh_setup_source` is used to install an app from a zip or tar.gz file,
### downloaded from an upstream source, like a git repository.
### `ynh_setup_source` use the file manifest.toml
# Download, check integrity, uncompress and patch the source from manifest.toml
ynh_setup_source --dest_dir="$install_dir"
### $install_dir will automatically be initialized with some decent
### permission by default ... however, you may need to recursively reapply
### ownership to all files such as after the ynh_setup_source step
chown -R "$app:www-data" "$install_dir"
#=================================================
# APP INITIAL CONFIGURATION
#=================================================
ynh_script_progression "Adding $app's configuration files..."
ynh_script_progression --message="Adding $app's configuration files..." --weight=1
ynh_config_add --template=.env --destination="$install_dir/.env"
### You can add specific configuration files.
###
### Typically, put your template conf file in ../conf/your_config_file
### The template may contain strings such as __FOO__ or __FOO_BAR__,
### which will automatically be replaced by the values of $foo and $foo_bar
###
### ynh_add_config will also keep track of the config file's checksum,
### which later during upgrade may allow to automatically backup the config file
### if it's found that the file was manually modified
###
### Check the documentation of `ynh_add_config` for more info.
chmod 640 "$install_dir/.env"
chown "$app:www-data" "$install_dir/.env"
ynh_add_config --template="some_config_file" --destination="$install_dir/some_config_file"
# FIXME: this should be handled by the core in the future
### You may need to use chmod 600 instead of 400,
### for example if the app is expected to be able to modify its own config
chmod 400 "$install_dir/some_config_file"
chown "$app:$app" "$install_dir/some_config_file"
### For more complex cases where you want to replace stuff using regexes,
### you shoud rely on ynh_replace_string (which is basically a wrapper for sed)
### When doing so, you also need to manually call ynh_store_file_checksum
###
### ynh_replace_string --match_string="match_string" --replace_string="replace_string" --target_file="$install_dir/some_config_file"
### ynh_store_file_checksum --file="$install_dir/some_config_file"
#=================================================
# SYSTEM CONFIGURATION
#=================================================
ynh_script_progression "Adding system configurations related to $app..."
ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
ynh_config_add_nginx
### `ynh_add_fpm_config` is used to set up a PHP config.
### You can remove it if your app doesn't use PHP.
### `ynh_add_fpm_config` will use the files conf/extra_php-fpm.conf
### If you're not using these lines:
### - You can remove these files in conf/.
### - Remove the section "BACKUP THE PHP-FPM CONFIGURATION" in the backup script
### - Remove also the section "REMOVE PHP-FPM CONFIGURATION" in the remove script
### - As well as the section "RESTORE THE PHP-FPM CONFIGURATION" in the restore script
### with the reload at the end of the script.
### - And the section "PHP-FPM CONFIGURATION" in the upgrade script
#=================================================
# INSTALL APP WITH COMPOSER
#=================================================
ynh_script_progression "Installing app with Composer..."
# Create a PHP-FPM config (with conf/extra_php-fpm.conf being appended to it)
ynh_add_fpm_config
ynh_composer_install
ynh_composer_exec install --no-dev
# Create a dedicated NGINX config using the conf/nginx.conf template
ynh_add_nginx_config
#=================================================
# BUILDING
#=================================================
ynh_script_progression "configuring $app..."
### `ynh_systemd_config` is used to configure a systemd script for an app.
### It can be used for apps that use sysvinit (with adaptation) or systemd.
### Have a look at the app to be sure this app needs a systemd script.
### `ynh_systemd_config` will use the file conf/systemd.service
### If you're not using these lines:
### - You can remove those files in conf/.
### - Remove the section "BACKUP SYSTEMD" in the backup script
### - Remove also the section "STOP AND REMOVE SERVICE" in the remove script
### - As well as the section "RESTORE SYSTEMD" in the restore script
### - And the section "SETUP SYSTEMD" in the upgrade script
pushd "$install_dir"
"php$php_version" artisan key:generate -n --force --env
"php$php_version" artisan make:database $app
"php$php_version" artisan migrate:fresh --seed -n --force
"php$php_version" artisan config:clear -n
"php$php_version" artisan config:cache -n
popd
# Create a dedicated systemd config
ynh_add_systemd_config
### `yunohost service add` integrates a service in YunoHost. It then gets
### displayed in the admin interface and through the others `yunohost service` commands.
### (N.B.: this line only makes sense if the app adds a service to the system!)
### If you're not using these lines:
### - You can remove these files in conf/.
### - Remove the section "REMOVE SERVICE INTEGRATION IN YUNOHOST" in the remove script
### - As well as the section "INTEGRATE SERVICE IN YUNOHOST" in the restore script
### - And the section "INTEGRATE SERVICE IN YUNOHOST" in the upgrade script
# file was touched by artisan, create a new key (copy/paste from Lychee)
ynh_store_file_checksum "$install_dir/.env"
app_key=$(cat $install_dir/.env | grep -e ^APP_KEY | cut -c 9-)
ynh_app_setting_set --key=app_key --value=$app_key
### Additional options starting with 3.8:
###
### --needs_exposed_ports "$port" a list of ports that needs to be publicly exposed
### which will then be checked by YunoHost's diagnosis system
### (N.B. DO NOT USE THIS if the port is only internal!!!)
###
### --test_status "some command" a custom command to check the status of the service
### (only relevant if 'systemctl status' doesn't do a good job)
###
### --test_conf "some command" some command similar to "nginx -t" that validates the conf of the service
###
### Re-calling 'yunohost service add' during the upgrade script is the right way
### to proceed if you later realize that you need to enable some flags that
### weren't enabled on old installs (be careful it'll override the existing
### service though so you should re-provide all relevant flags when doing so)
yunohost service add "$app" --description="A short description of the app" --log="/var/log/$app/$app.log"
# group only, make it www-data vs user/group $app:www-data
chgrp "www-data" -R "$install_dir/storage" "$install_dir/public"
chmod -R 2775 "$install_dir/storage" "$install_dir/app" "$install_dir/public" "$install_dir/bootstrap/"
### `ynh_use_logrotate` is used to configure a logrotate configuration for the logs of this app.
### Use this helper only if there is effectively a log file for this app.
### If you're not using this helper:
### - Remove the section "BACKUP LOGROTATE" in the backup script
### - Remove also the section "REMOVE LOGROTATE CONFIGURATION" in the remove script
### - As well as the section "RESTORE THE LOGROTATE CONFIGURATION" in the restore script
### - And the section "SETUP LOGROTATE" in the upgrade script
# Use logrotate to manage application logfile(s)
ynh_use_logrotate
# Create a dedicated Fail2Ban config
ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="Regex to match into the log for a failed login"
#=================================================
# SETUP APPLICATION WITH CURL
#=================================================
ynh_script_progression "Finalizing installation..."
# Installation with curl: set up the first/single user
ynh_local_curl /index.php/register" "name=$user" "email=$email" "password=$password" "password_confirmation=$password"
### Use these lines only if the app installation needs to be finalized through
### web forms. We generally don't want to ask the final user,
### so we're going to use curl to automatically fill the fields and submit the
### forms.
# Installation with curl
ynh_script_progression --message="Finalizing installation..." --weight=1
ynh_local_curl "/INSTALL_PATH" "key1=value1" "key2=value2" "key3=value3"
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Starting $app's systemd service..." --weight=1
### `ynh_systemd_action` is used to start a systemd service for an app.
### Only needed if you have configure a systemd service
### If you're not using these lines:
### - Remove the section "STOP SYSTEMD SERVICE" and "START SYSTEMD SERVICE" in the backup script
### - As well as the section "START SYSTEMD SERVICE" in the restore script
### - As well as the section"STOP SYSTEMD SERVICE" and "START SYSTEMD SERVICE" in the upgrade script
### - And the section "STOP SYSTEMD SERVICE" and "START SYSTEMD SERVICE" in the change_url script
# Start a systemd service
ynh_systemd_action --service_name="$app" --action="start" --log_path="/var/log/$app/$app.log"
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression "Installation of $app completed"
ynh_script_progression --message="Installation of $app completed" --last

View file

@ -7,17 +7,44 @@
source _common.sh
source /usr/share/yunohost/helpers
### Settings are automatically loaded as bash variables
### in every app script context, therefore typically these will exist:
### - $domain
### - $path
### - $language
### - $install_dir
### - $port
### ...
### For remove operations :
### - the core will deprovision every resource defined in the manifest **after** this script is ran
### this includes removing the install directory, and data directory (if --purge was used)
#=================================================
# REMOVE SYSTEM CONFIGURATIONS
#=================================================
ynh_script_progression "Removing system configurations related to $app..."
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
### This should be a symetric version of what happens in the install script
ynh_remove_fail2ban_config
ynh_config_remove_nginx
ynh_remove_logrotate
ynh_remove_systemd_config
ynh_remove_nginx_config
ynh_remove_fpm_config
# Remove other various files specific to the app... such as :
ynh_secure_remove --file="/etc/cron.d/$app"
ynh_secure_remove --file="/etc/$app"
ynh_secure_remove --file="/var/log/$app"
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression "Removal of $app completed"
ynh_script_progression --message="Removal of $app completed" --last

View file

@ -11,40 +11,83 @@ source /usr/share/yunohost/helpers
#=================================================
# RESTORE THE APP MAIN DIR
#=================================================
ynh_script_progression "Restoring the app main directory..."
ynh_script_progression --message="Restoring the app main directory..." --weight=1
ynh_restore "$install_dir"
ynh_restore_file --origin_path="$install_dir"
### $install_dir will automatically be initialized with some decent
### permissions by default ... however, you may need to recursively reapply
### ownership to all files such as after the ynh_setup_source step
chown -R "$app:www-data" "$install_dir"
#=================================================
# RESTORE THE DATA DIRECTORY
#=================================================
ynh_script_progression --message="Restoring the data directory..." --weight=1
ynh_restore_file --origin_path="$data_dir" --not_mandatory
### (Same as for install dir)
chown -R "$app:www-data" "$data_dir"
#=================================================
# RESTORE THE MYSQL DATABASE
#=================================================
ynh_script_progression "Restoring the MySQL database..."
ynh_script_progression --message="Restoring the MySQL database..." --weight=1
ynh_mysql_db_shell < ./db.sql
ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" < ./db.sql
#=================================================
# RESTORE SYSTEM CONFIGURATIONS
#=================================================
ynh_script_progression "Restoring system configurations related to $app..."
ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1
ynh_restore "/etc/nginx/conf.d/$domain.d/$app.conf"
### This should be a symetric version of what happens in the install script
chgrp "www-data" -R "$install_dir/storage" "$install_dir/public"
chmod -R 2775 "$install_dir/storage" "$install_dir/app" "$install_dir/public" "$install_dir/bootstrap/"
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
systemctl enable "$app.service" --quiet
yunohost service add "$app" --description="A short description of the app" --log="/var/log/$app/$app.log"
ynh_restore_file --origin_path="/etc/logrotate.d/$app"
ynh_restore_file --origin_path="/etc/fail2ban/jail.d/$app.conf"
ynh_restore_file --origin_path="/etc/fail2ban/filter.d/$app.conf"
ynh_systemd_action --action=restart --service_name=fail2ban
#=================================================
# RESTORE VARIOUS FILES
#=================================================
ynh_restore_file --origin_path="/etc/cron.d/$app"
ynh_restore_file --origin_path="/etc/$app/"
### For apps with huge logs, you might want to not backup logs every time:
### The mkdir call is just here in case the log directory was not backed up.
### mkdir -p "/var/log/$app"
### chown $app:www-data "/var/log/$app"
### ynh_restore_file --src_path="/var/log/$app/" --not_mandatory
###
### For other apps, the simple way is better:
ynh_restore_file --origin_path="/var/log/$app/"
#=================================================
# RELOAD NGINX AND PHP-FPM OR THE APP SERVICE
#=================================================
ynh_script_progression "Reloading NGINX web server and $app's service..."
ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1
ynh_systemctl --service="php$php_version-fpm" --action=reload
### Typically you only have either $app or php-fpm but not both at the same time...
ynh_systemd_action --service_name="$app" --action="start" --log_path="/var/log/$app/$app.log"
ynh_systemd_action --service_name="php$phpversion-fpm" --action=reload
ynh_systemctl --service=nginx --action=reload
ynh_systemd_action --service_name=nginx --action=reload
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression "Restoration completed for $app"
ynh_script_progression --message="Restoration completed for $app" --last

View file

@ -1,5 +1,6 @@
#!/bin/bash
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
@ -20,95 +21,107 @@ source /usr/share/yunohost/helpers
### - resources are automatically provisioned / updated / deleted (depending on existing resources)
### - a safety backup is automatically created by the core and will be restored if the upgrade fails
### This variable describes which upgrade type is occurring, allowing the script to handle different modes:
### - UPGRADE_PACKAGE if only the YunoHost package has changed
### - UPGRADE_APP if the upstream app version has changed
### If your package needs to handle other things, like same-version upgrades or downgrades, please
### check out the $YNH_APP_UPGRADE_TYPE variable that can contain DOWNGRADE and UPGRADE_SAME too.
# upgrade_type=$(ynh_check_app_version_changed)
#=================================================
# STOP SYSTEMD SERVICE
#=================================================
ynh_script_progression "Stopping $app's systemd service..."
ynh_script_progression --message="Stopping $app's systemd service..." --weight=1
ynh_systemctl --service="$app" --action="stop"
ynh_systemd_action --service_name="$app" --action="stop" --log_path="/var/log/$app/$app.log"
#=================================================
# ENSURE DOWNWARD COMPATIBILITY
#=================================================
ynh_script_progression "Ensuring downward compatibility..."
ynh_app_setting_set_default --key=php_upload_max_filesize --value=50M
ynh_app_setting_set_default --key=php_post_max_size --value=50M
#ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
### N.B. : the following setting migration snippets are provided as *EXAMPLES*
### of what you may want to do in some cases (e.g. a setting was not defined on
### some legacy installs and you therefore want to initiaze stuff during upgrade)
# If db_name doesn't exist, create it
# ynh_app_setting_set_default --key=db_name --value="$(ynh_sanitize_dbid --db_name=$app)"
# if [ -z "$db_name" ]; then
# db_name=$(ynh_sanitize_dbid --db_name=$app)
# ynh_app_setting_set --app=$app --key=db_name --value=$db_name
# fi
# If install_dir doesn't exist, create it
# ynh_app_setting_set_default --key=install_dir --value="/var/www/$app"
# if [ -z "$install_dir" ]; then
# install_dir=/var/www/$app
# ynh_app_setting_set --app=$app --key=install_dir --value=$install_dir
# fi
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_script_progression "Upgrading source files..."
ynh_script_progression --message="Upgrading source files..." --weight=1
### ynh_setup_source can wipe the destination dir if called with --full_replace.
### On upgrade, that is certainly what you want, to remove any old source file that
### does not exist in the new version of the software.
### You can list with --keep every file/directory to *not* wipe or overwrite,
### useful for configuration files, data directories, or plugins.
# Download, check integrity, uncompress and patch the source from manifest.toml
ynh_setup_source --dest_dir="$install_dir" --full_replace --keep=".env data"
ynh_setup_source --dest_dir="$install_dir"
### $install_dir will automatically be initialized with some decent
### permissions by default... however, you may need to recursively reapply
### permissions by default ... however, you may need to recursively reapply
### ownership to all files such as after the ynh_setup_source step
chown -R "$app:www-data" "$install_dir"
#=================================================
# TODO - DB migration if applicable
#=================================================
ynh_script_progression "Migrating $app's database to the new data model..."
## find upstream migration script
#=================================================
# UPDATE A CONFIG FILE
#=================================================
ynh_script_progression "Updating $app's configuration files..."
ynh_script_progression --message="Updating $app's configuration files..." --weight=1
### Same as during install
###
### The file will automatically be backed-up if it's found to be manually modified (because
### ynh_config_add keeps track of the file's checksum)
### ynh_add_config keeps track of the file's checksum)
#ynh_config_add --template="some_config_file" --destination="$install_dir/some_config_file"
# there's just the nginx conf and the .env that's still available (--keep above)
ynh_add_config --template="some_config_file" --destination="$install_dir/some_config_file"
# FIXME: this should be handled by the core in the future
### You may need to use chmod 600 instead of 400,
### for example if the app is expected to be able to modify its own config
#chmod 400 "$install_dir/some_config_file"
#chown "$app:$app" "$install_dir/some_config_file"
chmod 400 "$install_dir/some_config_file"
chown "$app:$app" "$install_dir/some_config_file"
### For more complex cases where you want to replace stuff using regexes,
### you shoud rely on ynh_replace (which is basically a wrapper for sed)
### you shoud rely on ynh_replace_string (which is basically a wrapper for sed)
### When doing so, you also need to manually call ynh_store_file_checksum
###
### ynh_replace --match="match_string" --replace="replace_string" --file="$install_dir/some_config_file"
### ynh_store_file_checksum "$install_dir/some_config_file"
### ynh_replace_string --match_string="match_string" --replace_string="replace_string" --target_file="$install_dir/some_config_file"
### ynh_store_file_checksum --file="$install_dir/some_config_file"
#=================================================
# REAPPLY SYSTEM CONFIGURATIONS
#=================================================
ynh_script_progression "Upgrading system configurations related to $app..."
ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1
### This should be a literal copypaste of what happened in the install's "System configuration" section
ynh_config_add_nginx
ynh_add_fpm_config
#ynh_config_add_fail2ban --logpath="/var/log/nginx/${domain}-error.log" --failregex="Regex to match into the log for a failed login"
ynh_add_nginx_config
ynh_add_systemd_config
yunohost service add "$app" --description="A short description of the app" --log="/var/log/$app/$app.log"
ynh_use_logrotate --non-append
ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="Regex to match into the log for a failed login"
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Starting $app's systemd service..." --weight=1
ynh_systemd_action --service_name="$app" --action="start" --log_path="/var/log/$app/$app.log"
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression "Upgrade of $app completed"
ynh_script_progression --message="Upgrade of $app completed" --last

2
sources/extra_files/app/.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
*~
*.sw[op]

2
sources/patches/.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
*~
*.sw[op]