1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/iceshrimp_ynh.git synced 2024-09-03 19:15:54 +02:00

Merge pull request #13 from YunoHost-Apps/helpers

Use standard redis helpers
This commit is contained in:
Salamandar 2024-05-20 21:42:07 +02:00 committed by GitHub
commit 7ec52f37d1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 150 additions and 46 deletions

View file

@ -1,6 +1,8 @@
# 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)
- [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)
- [Leggi il “README” in italiano](README_it.md) - [阅读中文(简体)的 README](README_zh_Hans.md)

View file

@ -9,7 +9,7 @@ It shall NOT be edited by hand.
[![Install Iceshrimp with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=iceshrimp) [![Install Iceshrimp with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=iceshrimp)
*[Read this README is other languages.](./ALL_README.md)* *[Read this README in other languages.](./ALL_README.md)*
> *This package allows you to install Iceshrimp quickly and simply on a YunoHost server.* > *This package allows you to install Iceshrimp 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.* > *If you don't have YunoHost, please consult [the guide](https://yunohost.org/install) to learn how to install it.*

48
README_es.md Normal file
View file

@ -0,0 +1,48 @@
<!--
Este archivo README esta generado automaticamente<https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
No se debe editar a mano.
-->
# Iceshrimp para Yunohost
[![Nivel de integración](https://dash.yunohost.org/integration/iceshrimp.svg)](https://dash.yunohost.org/appci/app/iceshrimp) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/iceshrimp.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/iceshrimp.maintain.svg)
[![Instalar Iceshrimp con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=iceshrimp)
*[Leer este README en otros idiomas.](./ALL_README.md)*
> *Este paquete le permite instalarIceshrimp 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
Iceshrimp is a decentralized and federated social networking service, implementing the ActivityPub standard.
It was forked from Calckey Firefish (itself a fork of Misskey) in mid-2023, to focus on stability, performance and usability instead of new features.
**Versión actual:** 2023.12.5~ynh1
## Capturas
![Captura de Iceshrimp](./doc/screenshots/example.jpg)
## Documentaciones y recursos
- Sitio web oficial: <https://iceshrimp.dev>
- Repositorio del código fuente oficial de la aplicación : <https://iceshrimp.dev/iceshrimp/iceshrimp>
- Catálogo YunoHost: <https://apps.yunohost.org/app/iceshrimp>
- Reportar un error: <https://github.com/YunoHost-Apps/iceshrimp_ynh/issues>
## Información para desarrolladores
Por favor enviar sus correcciones a la [`branch testing`](https://github.com/YunoHost-Apps/iceshrimp_ynh/tree/testing
Para probar la rama `testing`, sigue asÍ:
```bash
sudo yunohost app install https://github.com/YunoHost-Apps/iceshrimp_ynh/tree/testing --debug
o
sudo yunohost app upgrade iceshrimp -u https://github.com/YunoHost-Apps/iceshrimp_ynh/tree/testing --debug
```
**Mas informaciones sobre el empaquetado de aplicaciones:** <https://yunohost.org/packaging_apps>

48
README_eu.md Normal file
View file

@ -0,0 +1,48 @@
<!--
Ohart ongi: README hau automatikoki sortu da <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>ri esker
EZ editatu eskuz.
-->
# Iceshrimp YunoHost-erako
[![Integrazio maila](https://dash.yunohost.org/integration/iceshrimp.svg)](https://dash.yunohost.org/appci/app/iceshrimp) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/iceshrimp.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/iceshrimp.maintain.svg)
[![Instalatu Iceshrimp YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=iceshrimp)
*[Irakurri README hau beste hizkuntzatan.](./ALL_README.md)*
> *Pakete honek Iceshrimp YunoHost zerbitzari batean azkar eta zailtasunik gabe instalatzea ahalbidetzen dizu.*
> *YunoHost ez baduzu, kontsultatu [gida](https://yunohost.org/install) nola instalatu ikasteko.*
## Aurreikuspena
Iceshrimp is a decentralized and federated social networking service, implementing the ActivityPub standard.
It was forked from Calckey Firefish (itself a fork of Misskey) in mid-2023, to focus on stability, performance and usability instead of new features.
**Paketatutako bertsioa:** 2023.12.5~ynh1
## Pantaila-argazkiak
![Iceshrimp(r)en pantaila-argazkia](./doc/screenshots/example.jpg)
## Dokumentazioa eta baliabideak
- Aplikazioaren webgune ofiziala: <https://iceshrimp.dev>
- Jatorrizko aplikazioaren kode-gordailua: <https://iceshrimp.dev/iceshrimp/iceshrimp>
- YunoHost Denda: <https://apps.yunohost.org/app/iceshrimp>
- Eman errore baten berri: <https://github.com/YunoHost-Apps/iceshrimp_ynh/issues>
## Garatzaileentzako informazioa
Bidali `pull request`a [`testing` abarrera](https://github.com/YunoHost-Apps/iceshrimp_ynh/tree/testing).
`testing` abarra probatzeko, ondorengoa egin:
```bash
sudo yunohost app install https://github.com/YunoHost-Apps/iceshrimp_ynh/tree/testing --debug
edo
sudo yunohost app upgrade iceshrimp -u https://github.com/YunoHost-Apps/iceshrimp_ynh/tree/testing --debug
```
**Informazio gehiago aplikazioaren paketatzeari buruz:** <https://yunohost.org/packaging_apps>

48
README_zh_Hans.md Normal file
View file

@ -0,0 +1,48 @@
<!--
注意:此 README 由 <https://github.com/YunoHost/apps/tree/master/tools/readme_generator> 自动生成
请勿手动编辑。
-->
# YunoHost 上的 Iceshrimp
[![集成程度](https://dash.yunohost.org/integration/iceshrimp.svg)](https://dash.yunohost.org/appci/app/iceshrimp) ![工作状态](https://ci-apps.yunohost.org/ci/badges/iceshrimp.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/iceshrimp.maintain.svg)
[![使用 YunoHost 安装 Iceshrimp](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=iceshrimp)
*[阅读此 README 的其它语言版本。](./ALL_README.md)*
> *通过此软件包,您可以在 YunoHost 服务器上快速、简单地安装 Iceshrimp。*
> *如果您还没有 YunoHost请参阅[指南](https://yunohost.org/install)了解如何安装它。*
## 概况
Iceshrimp is a decentralized and federated social networking service, implementing the ActivityPub standard.
It was forked from Calckey Firefish (itself a fork of Misskey) in mid-2023, to focus on stability, performance and usability instead of new features.
**分发版本:** 2023.12.5~ynh1
## 截图
![Iceshrimp 的截图](./doc/screenshots/example.jpg)
## 文档与资源
- 官方应用网站: <https://iceshrimp.dev>
- 上游应用代码库: <https://iceshrimp.dev/iceshrimp/iceshrimp>
- YunoHost 商店: <https://apps.yunohost.org/app/iceshrimp>
- 报告 bug <https://github.com/YunoHost-Apps/iceshrimp_ynh/issues>
## 开发者信息
请向 [`testing` 分支](https://github.com/YunoHost-Apps/iceshrimp_ynh/tree/testing) 发送拉取请求。
如要尝试 `testing` 分支,请这样操作:
```bash
sudo yunohost app install https://github.com/YunoHost-Apps/iceshrimp_ynh/tree/testing --debug
sudo yunohost app upgrade iceshrimp -u https://github.com/YunoHost-Apps/iceshrimp_ynh/tree/testing --debug
```
**有关应用打包的更多信息:** <https://yunohost.org/packaging_apps>

View file

@ -15,7 +15,7 @@ website = "https://iceshrimp.dev"
code = "https://iceshrimp.dev/iceshrimp/iceshrimp" code = "https://iceshrimp.dev/iceshrimp/iceshrimp"
[integration] [integration]
yunohost = ">= 11.2" yunohost = ">= 11.2.12"
architectures = "all" architectures = "all"
multi_instance = false multi_instance = false

View file

@ -15,45 +15,3 @@ NODEJS_VERSION="20"
#================================================= #=================================================
# 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
}