mirror of
https://github.com/YunoHost-Apps/misskey_ynh.git
synced 2024-09-03 19:46:03 +02:00
Merge pull request #160 from YunoHost-Apps/helpers
Use standard redis helpers
This commit is contained in:
commit
a426c07ab1
5 changed files with 50 additions and 44 deletions
|
@ -1,6 +1,7 @@
|
||||||
# All available README files by language
|
# All available README files by language
|
||||||
|
|
||||||
- [Read the README in English](README.md)
|
- [Read the README in English](README.md)
|
||||||
|
- [Lee el README en español](README_es.md)
|
||||||
- [Irakurri README euskaraz](README_eu.md)
|
- [Irakurri README euskaraz](README_eu.md)
|
||||||
- [Lire le README en français](README_fr.md)
|
- [Lire le README en français](README_fr.md)
|
||||||
- [Le o README en galego](README_gl.md)
|
- [Le o README en galego](README_gl.md)
|
||||||
|
|
47
README_es.md
Normal file
47
README_es.md
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
<!--
|
||||||
|
Este archivo README esta generado automaticamente<https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
|
||||||
|
No se debe editar a mano.
|
||||||
|
-->
|
||||||
|
|
||||||
|
# Misskey para Yunohost
|
||||||
|
|
||||||
|
[](https://dash.yunohost.org/appci/app/misskey)  
|
||||||
|
|
||||||
|
[](https://install-app.yunohost.org/?app=misskey)
|
||||||
|
|
||||||
|
*[Leer este README en otros idiomas.](./ALL_README.md)*
|
||||||
|
|
||||||
|
> *Este paquete le permite instalarMisskey 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
|
||||||
|
|
||||||
|
Misskey is a decentralized microblogging platform. Since it exists within the Fediverse (a universe where various social media platforms are organized), it is mutually linked with other social media platforms.
|
||||||
|
|
||||||
|
|
||||||
|
**Versión actual:** 12.119.2~ynh2
|
||||||
|
|
||||||
|
## Capturas
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Documentaciones y recursos
|
||||||
|
|
||||||
|
- Sitio web oficial: <https://misskey-hub.net/>
|
||||||
|
- Repositorio del código fuente oficial de la aplicación : <https://github.com/misskey-dev/misskey>
|
||||||
|
- Catálogo YunoHost: <https://apps.yunohost.org/app/misskey>
|
||||||
|
- Reportar un error: <https://github.com/YunoHost-Apps/misskey_ynh/issues>
|
||||||
|
|
||||||
|
## Información para desarrolladores
|
||||||
|
|
||||||
|
Por favor enviar sus correcciones a la [`branch testing`](https://github.com/YunoHost-Apps/misskey_ynh/tree/testing
|
||||||
|
|
||||||
|
Para probar la rama `testing`, sigue asÍ:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo yunohost app install https://github.com/YunoHost-Apps/misskey_ynh/tree/testing --debug
|
||||||
|
o
|
||||||
|
sudo yunohost app upgrade misskey -u https://github.com/YunoHost-Apps/misskey_ynh/tree/testing --debug
|
||||||
|
```
|
||||||
|
|
||||||
|
**Mas informaciones sobre el empaquetado de aplicaciones:** <https://yunohost.org/packaging_apps>
|
|
@ -3,7 +3,7 @@
|
||||||
请勿手动编辑。
|
请勿手动编辑。
|
||||||
-->
|
-->
|
||||||
|
|
||||||
# YunoHost 的 Misskey
|
# YunoHost 上的 Misskey
|
||||||
|
|
||||||
[](https://dash.yunohost.org/appci/app/misskey)  
|
[](https://dash.yunohost.org/appci/app/misskey)  
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ cpe = "cpe:2.3:a:misskey:misskey"
|
||||||
fund = "https://patreon.com/syuilo"
|
fund = "https://patreon.com/syuilo"
|
||||||
|
|
||||||
[integration]
|
[integration]
|
||||||
yunohost = ">= 11.2"
|
yunohost = ">= 11.2.12"
|
||||||
architectures = ["amd64", "arm64"]
|
architectures = ["amd64", "arm64"]
|
||||||
multi_instance = true
|
multi_instance = true
|
||||||
ldap = false
|
ldap = false
|
||||||
|
|
|
@ -24,45 +24,3 @@ misskey_build() {
|
||||||
#=================================================
|
#=================================================
|
||||||
# EXPERIMENTAL HELPERS
|
# EXPERIMENTAL HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# REDIS 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
|
|
||||||
}
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue