1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/etherpad_ynh.git synced 2024-09-03 18:36:10 +02:00

Merge pull request #39 from YunoHost-Apps/helpers

Use standard redis helpers
This commit is contained in:
Salamandar 2024-05-20 22:29:25 +02:00 committed by GitHub
commit b2547c8575
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 57 additions and 43 deletions

View file

@ -1,6 +1,7 @@
# All available README files by language
- [Read the README in English](README.md)
- [Lee 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)

53
README_es.md Normal file
View file

@ -0,0 +1,53 @@
<!--
Este archivo README esta generado automaticamente<https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
No se debe editar a mano.
-->
# Etherpad para Yunohost
[![Nivel de integración](https://dash.yunohost.org/integration/etherpad.svg)](https://dash.yunohost.org/appci/app/etherpad) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/etherpad.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/etherpad.maintain.svg)
[![Instalar Etherpad con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=etherpad)
*[Leer este README en otros idiomas.](./ALL_README.md)*
> *Este paquete le permite instalarEtherpad 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
Etherpad is a real-time collaborative editor scalable to thousands of simultaneous real time users. It provides full data export capabilities, and runs on your server, under your control.
This version of Etherpad is installed without plugins and uses Redis as database.
Be aware, Redis database backup and restore is not fully implemented.
If you want to install Etherpad with plugins and mysql database: https://github.com/YunoHost-Apps/etherpad_mypads_ynh",
**Versión actual:** 2.0.3~ynh1
**Demo:** <https://video.etherpad.com/>
## Capturas
![Captura de Etherpad](./doc/screenshots/screenshot.png)
## Documentaciones y recursos
- Sitio web oficial: <https://etherpad.org/>
- Documentación administrador oficial: <https://etherpad.org/doc/v2.0.2/>
- Repositorio del código fuente oficial de la aplicación : <https://github.com/ether/etherpad-lite>
- Catálogo YunoHost: <https://apps.yunohost.org/app/etherpad>
- Reportar un error: <https://github.com/YunoHost-Apps/etherpad_ynh/issues>
## Información para desarrolladores
Por favor enviar sus correcciones a la [`branch testing`](https://github.com/YunoHost-Apps/etherpad_ynh/tree/testing
Para probar la rama `testing`, sigue asÍ:
```bash
sudo yunohost app install https://github.com/YunoHost-Apps/etherpad_ynh/tree/testing --debug
o
sudo yunohost app upgrade etherpad -u https://github.com/YunoHost-Apps/etherpad_ynh/tree/testing --debug
```
**Mas informaciones sobre el empaquetado de aplicaciones:** <https://yunohost.org/packaging_apps>

View file

@ -17,7 +17,7 @@ admindoc = "https://etherpad.org/doc/v2.0.2/"
code = "https://github.com/ether/etherpad-lite"
[integration]
yunohost = ">= 11.2"
yunohost = ">= 11.2.12"
architectures = "all"
multi_instance = true
@ -82,14 +82,13 @@ ram.runtime = "50M"
[resources.apt]
packages = ""
packages_from_raw_bash = """
if [[ "$export" == "libreoffice" ]]
then
then
echo "unoconv libreoffice-writer"
elif [[ "$export" == "abiword" ]]
then
echo "abiword"
fi
"""

View file

@ -17,42 +17,3 @@ nodejs_version=22
#=================================================
# FUTURE OFFICIAL HELPERS
#=================================================
# get the first available redis database
#
# usage: ynh_redis_get_free_db
# | returns: the database number to use
ynh_redis_get_free_db() {
local result max db
result="$(redis-cli INFO keyspace)"
# get the num
max=$(cat /etc/redis/redis.conf | grep ^databases | grep -Eow "[0-9]+")
db=0
# default Debian setting is 15 databases
for i in $(seq 0 "$max")
do
if ! echo "$result" | grep -q "db$i"
then
db=$i
break 1
fi
db=-1
done
test "$db" -eq -1 && ynh_die --message="No available Redis databases..."
echo "$db"
}
# Create a master password and set up global settings
# Please always call this script in install and restore scripts
#
# usage: ynh_redis_remove_db database
# | arg: database - the database to erase
ynh_redis_remove_db() {
local db=$1
redis-cli -n "$db" flushall
}