From 19559c341f0ac1789014c47677a33a3c6b42b4c4 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 20 May 2024 05:47:14 +0000 Subject: [PATCH 1/2] Auto-update READMEs --- ALL_README.md | 4 +++- README.md | 2 +- README_es.md | 50 +++++++++++++++++++++++++++++++++++++++++++++++ README_eu.md | 50 +++++++++++++++++++++++++++++++++++++++++++++++ README_zh_Hans.md | 50 +++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 154 insertions(+), 2 deletions(-) create mode 100644 README_es.md create mode 100644 README_eu.md create mode 100644 README_zh_Hans.md diff --git a/ALL_README.md b/ALL_README.md index 3d6c579..8938aae 100644 --- a/ALL_README.md +++ b/ALL_README.md @@ -1,6 +1,8 @@ # 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) -- [Leggi il “README” in italiano](README_it.md) +- [阅读中文(简体)的 README](README_zh_Hans.md) diff --git a/README.md b/README.md index 9885a76..127bbc9 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ It shall NOT be edited by hand. [![Install Satdress with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=satdress) -*[Read this README is other languages.](./ALL_README.md)* +*[Read this README in other languages.](./ALL_README.md)* > *This package allows you to install Satdress 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.* diff --git a/README_es.md b/README_es.md new file mode 100644 index 0000000..61bf6b6 --- /dev/null +++ b/README_es.md @@ -0,0 +1,50 @@ + + +# Satdress para Yunohost + +[![Nivel de integración](https://dash.yunohost.org/integration/satdress.svg)](https://dash.yunohost.org/appci/app/satdress) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/satdress.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/satdress.maintain.svg) + +[![Instalar Satdress con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=satdress) + +*[Leer este README en otros idiomas.](./ALL_README.md)* + +> *Este paquete le permite instalarSatdress 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 + +Federated Lightning Address server anyone can self-host to receive Lightning payments at you@yourdomain.com noncustodially. + + +**Versión actual:** 0.8.0~ynh1 + +**Demo:** + +## Capturas + +![Captura de Satdress](./doc/screenshots/example.jpg) + +## Documentaciones y recursos + +- Documentación usuario oficial: +- Documentación administrador oficial: +- Repositorio del código fuente oficial de la aplicación : +- Catálogo YunoHost: +- Reportar un error: + +## Información para desarrolladores + +Por favor enviar sus correcciones a la [`branch testing`](https://github.com/YunoHost-Apps/satdress_ynh/tree/testing + +Para probar la rama `testing`, sigue asÍ: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/satdress_ynh/tree/testing --debug +o +sudo yunohost app upgrade satdress -u https://github.com/YunoHost-Apps/satdress_ynh/tree/testing --debug +``` + +**Mas informaciones sobre el empaquetado de aplicaciones:** diff --git a/README_eu.md b/README_eu.md new file mode 100644 index 0000000..72cec1c --- /dev/null +++ b/README_eu.md @@ -0,0 +1,50 @@ + + +# Satdress YunoHost-erako + +[![Integrazio maila](https://dash.yunohost.org/integration/satdress.svg)](https://dash.yunohost.org/appci/app/satdress) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/satdress.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/satdress.maintain.svg) + +[![Instalatu Satdress YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=satdress) + +*[Irakurri README hau beste hizkuntzatan.](./ALL_README.md)* + +> *Pakete honek Satdress YunoHost zerbitzari batean azkar eta zailtasunik gabe instalatzea ahalbidetzen dizu.* +> *YunoHost ez baduzu, kontsultatu [gida](https://yunohost.org/install) nola instalatu ikasteko.* + +## Aurreikuspena + +Federated Lightning Address server anyone can self-host to receive Lightning payments at you@yourdomain.com noncustodially. + + +**Paketatutako bertsioa:** 0.8.0~ynh1 + +**Demoa:** + +## Pantaila-argazkiak + +![Satdress(r)en pantaila-argazkia](./doc/screenshots/example.jpg) + +## Dokumentazioa eta baliabideak + +- Erabiltzaileen dokumentazio ofiziala: +- Administratzaileen dokumentazio ofiziala: +- Jatorrizko aplikazioaren kode-gordailua: +- YunoHost Denda: +- Eman errore baten berri: + +## Garatzaileentzako informazioa + +Bidali `pull request`a [`testing` abarrera](https://github.com/YunoHost-Apps/satdress_ynh/tree/testing). + +`testing` abarra probatzeko, ondorengoa egin: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/satdress_ynh/tree/testing --debug +edo +sudo yunohost app upgrade satdress -u https://github.com/YunoHost-Apps/satdress_ynh/tree/testing --debug +``` + +**Informazio gehiago aplikazioaren paketatzeari buruz:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md new file mode 100644 index 0000000..3feea90 --- /dev/null +++ b/README_zh_Hans.md @@ -0,0 +1,50 @@ + + +# YunoHost 上的 Satdress + +[![集成程度](https://dash.yunohost.org/integration/satdress.svg)](https://dash.yunohost.org/appci/app/satdress) ![工作状态](https://ci-apps.yunohost.org/ci/badges/satdress.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/satdress.maintain.svg) + +[![使用 YunoHost 安装 Satdress](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=satdress) + +*[阅读此 README 的其它语言版本。](./ALL_README.md)* + +> *通过此软件包,您可以在 YunoHost 服务器上快速、简单地安装 Satdress。* +> *如果您还没有 YunoHost,请参阅[指南](https://yunohost.org/install)了解如何安装它。* + +## 概况 + +Federated Lightning Address server anyone can self-host to receive Lightning payments at you@yourdomain.com noncustodially. + + +**分发版本:** 0.8.0~ynh1 + +**演示:** + +## 截图 + +![Satdress 的截图](./doc/screenshots/example.jpg) + +## 文档与资源 + +- 官方用户文档: +- 官方管理文档: +- 上游应用代码库: +- YunoHost 商店: +- 报告 bug: + +## 开发者信息 + +请向 [`testing` 分支](https://github.com/YunoHost-Apps/satdress_ynh/tree/testing) 发送拉取请求。 + +如要尝试 `testing` 分支,请这样操作: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/satdress_ynh/tree/testing --debug +或 +sudo yunohost app upgrade satdress -u https://github.com/YunoHost-Apps/satdress_ynh/tree/testing --debug +``` + +**有关应用打包的更多信息:** From e00a2d1f1188b4bc2ba9c439eef0865223cc306d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 20 May 2024 07:53:21 +0200 Subject: [PATCH 2/2] cleaning --- scripts/backup | 12 +-------- scripts/install | 29 +++++--------------- scripts/remove | 27 ++----------------- scripts/restore | 34 ++++-------------------- scripts/upgrade | 70 ++++++++++++++----------------------------------- 5 files changed, 34 insertions(+), 138 deletions(-) diff --git a/scripts/backup b/scripts/backup index 737146f..132f64e 100755 --- a/scripts/backup +++ b/scripts/backup @@ -22,23 +22,13 @@ ynh_print_info --message="Declaring files to be backed up..." ynh_backup --src_path="$install_dir" #================================================= -# BACKUP THE NGINX CONFIGURATION +# SYSTEM CONFIGURATION #================================================= ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# SPECIFIC BACKUP -#================================================= -# BACKUP LOGROTATE -#================================================= - ynh_backup --src_path="/etc/logrotate.d/$app" -#================================================= -# BACKUP SYSTEMD -#================================================= - ynh_backup --src_path="/etc/systemd/system/$app.service" #================================================= diff --git a/scripts/install b/scripts/install index 5a3e3b9..6712943 100755 --- a/scripts/install +++ b/scripts/install @@ -39,14 +39,6 @@ ynh_setup_source --dest_dir="$install_dir/build" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Configuring NGINX web server..." --weight=1 - -# Create a dedicated NGINX config -ynh_add_nginx_config - #================================================= # SPECIFIC SETUP #================================================= @@ -72,28 +64,19 @@ chown -R $app:root "$install_dir" chmod 750 "${install_dir}/bin/satdress" #================================================= -# SETUP SYSTEMD +# SYSTEM CONFIGURATION #================================================= -ynh_script_progression --message="Configuring a systemd service..." --weight=1 +ynh_script_progression --message="Adding system configurations related to $app..." --weight=1 + +# Create a dedicated NGINX config +ynh_add_nginx_config # Create a dedicated systemd config ynh_add_systemd_config -#================================================= -# GENERIC FINALIZATION -#================================================= -# SETUP LOGROTATE -#================================================= -ynh_script_progression --message="Configuring log rotation..." --weight=1 - ynh_use_logrotate -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 - -yunohost service add $app --description="Federated Lightning addresses server." --log="/var/log/$app/$app.log" +yunohost service add $app --description="Federated Lightning addresses server" --log="/var/log/$app/$app.log" #================================================= # START SYSTEMD SERVICE diff --git a/scripts/remove b/scripts/remove index 3b5236b..0490353 100755 --- a/scripts/remove +++ b/scripts/remove @@ -10,10 +10,9 @@ source _common.sh source /usr/share/yunohost/helpers #================================================= -# STANDARD REMOVE -#================================================= -# REMOVE SERVICE INTEGRATION IN YUNOHOST +# REMOVE SYSTEM CONFIGURATIONS #================================================= +ynh_script_progression --message="Removing system configurations related to $app..." --weight=1 # Remove the service from the list of services known by YunoHost (added from `yunohost service add`) if ynh_exec_warn_less yunohost service status $app >/dev/null @@ -22,37 +21,15 @@ then yunohost service remove $app fi -#================================================= -# STOP AND REMOVE SERVICE -#================================================= -ynh_script_progression --message="Stopping and removing the systemd service..." --weight=1 - # Remove the dedicated systemd config ynh_remove_systemd_config -#================================================= -# REMOVE LOGROTATE CONFIGURATION -#================================================= -ynh_script_progression --message="Removing logrotate configuration..." --weight=1 - # Remove the app-specific logrotate config ynh_remove_logrotate -#================================================= -# REMOVE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1 - # Remove the dedicated NGINX config ynh_remove_nginx_config -#================================================= -# SPECIFIC REMOVE -#================================================= -# REMOVE VARIOUS FILES -#================================================= -ynh_script_progression --message="Removing various files..." --weight=1 - # Remove the log files ynh_secure_remove --file="/var/log/$app" diff --git a/scripts/restore b/scripts/restore index f551fea..3ab2d9a 100755 --- a/scripts/restore +++ b/scripts/restore @@ -21,50 +21,26 @@ chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" #================================================= -# SPECIFIC RESTORATION +# RESTORE SYSTEM CONFIGURATIONS #================================================= -# RESTORE THE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1 +ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1 ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# RESTORE SYSTEMD -#================================================= -ynh_script_progression --message="Restoring the systemd configuration..." --weight=1 - ynh_restore_file --origin_path="/etc/systemd/system/$app.service" systemctl enable $app.service --quiet -#================================================= -# RESTORE THE LOGROTATE CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the logrotate configuration..." --weight=1 - ynh_restore_file --origin_path="/etc/logrotate.d/$app" -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 - -yunohost service add $app --description="Federated Lightning addresses server." --log="/var/log/$app/$app.log" +yunohost service add $app --description="Federated Lightning addresses server" --log="/var/log/$app/$app.log" #================================================= -# START SYSTEMD SERVICE +# RELOAD NGINX AND PHP-FPM OR THE APP SERVICE #================================================= -ynh_script_progression --message="Starting a systemd service..." --weight=1 +ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1 ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" -#================================================= -# GENERIC FINALIZATION -#================================================= -# RELOAD NGINX -#================================================= -ynh_script_progression --message="Reloading NGINX web server" --weight=1 - ynh_systemd_action --service_name=nginx --action=reload #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index fb780ca..8f0f4d8 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -10,12 +10,6 @@ source _common.sh source ynh_install_go source /usr/share/yunohost/helpers -#================================================= -# CHECK VERSION -#================================================= - -upgrade_type=$(ynh_check_app_version_changed) - #================================================= # STANDARD UPGRADE STEPS #================================================= @@ -28,78 +22,54 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +ynh_script_progression --message="Upgrading source files..." --weight=1 -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_script_progression --message="Upgrading source files..." --weight=1 - - # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir/build" --keep="$site_name-multiple.db" -fi +# Download, check integrity, uncompress and patch the source from app.src +ynh_setup_source --dest_dir="$install_dir/build" --keep="$site_name-multiple.db" chmod 750 "$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1 - -# Create a dedicated NGINX config -ynh_add_nginx_config - #================================================= # SPECIFIC UPGRADE #================================================= # BUILDING SOURCES AND SETTING UP THE SERVER #================================================= +ynh_script_progression --message="Building the sources (it will take some time)..." --weight=6 -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_script_progression --message="Building the sources (it will take some time)..." --weight=6 +ynh_exec_warn_less ynh_install_go --go_version=$GO_VERSION - ynh_exec_warn_less ynh_install_go --go_version=$GO_VERSION - - pushd "$install_dir/build" - # Build the sources - ynh_use_go - export GOPATH="$install_dir/build/go" - export GOCACHE="$install_dir/build/.cache" - CGO_ENABLED=1 go build -trimpath -v -o "$install_dir/bin/" > /dev/null 2>&1 - popd +pushd "$install_dir/build" + # Build the sources + ynh_use_go + export GOPATH="$install_dir/build/go" + export GOCACHE="$install_dir/build/.cache" + CGO_ENABLED=1 go build -trimpath -v -o "$install_dir/bin/" > /dev/null 2>&1 +popd #REMOVEME? ynh_secure_remove --file="$install_dir/build" - ynh_remove_go -fi +ynh_remove_go + chown -R $app:root "$install_dir" chmod 750 "${install_dir}/bin/satdress" #================================================= -# SETUP SYSTEMD +# REAPPLY SYSTEM CONFIGURATIONS #================================================= -ynh_script_progression --message="Upgrading systemd configuration..." --weight=1 +ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1 + +# Create a dedicated NGINX config +ynh_add_nginx_config # Create a dedicated systemd config ynh_add_systemd_config -#================================================= -# GENERIC FINALIZATION -#================================================= -# SETUP LOGROTATE -#================================================= -ynh_script_progression --message="Upgrading logrotate configuration..." --weight=1 - # Use logrotate to manage app-specific logfile(s) ynh_use_logrotate --non-append -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 - -yunohost service add $app --description="Federated Lightning addresses server." --log="/var/log/$app/$app.log" +yunohost service add $app --description="Federated Lightning addresses server" --log="/var/log/$app/$app.log" #================================================= # START SYSTEMD SERVICE