From 98a0320673e3e3d27d039bfc5f727b1959ed2d7c Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 29 Mar 2024 07:11:22 +0100 Subject: [PATCH 1/3] Auto-update README --- ALL_README.md | 6 ++++++ README.md | 26 +++++++++++++------------- README_fr.md | 32 ++++++++++++++++---------------- README_gl.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ README_it.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 135 insertions(+), 29 deletions(-) create mode 100644 ALL_README.md create mode 100644 README_gl.md create mode 100644 README_it.md diff --git a/ALL_README.md b/ALL_README.md new file mode 100644 index 0000000..3d6c579 --- /dev/null +++ b/ALL_README.md @@ -0,0 +1,6 @@ +# All available README files by language + +- [Read the README in English](README.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) diff --git a/README.md b/README.md index 3877d88..77abe76 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ @@ -9,10 +9,10 @@ It shall NOT be edited by hand. [![Install Luckysheet with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=luckysheet) -*[Lire ce readme en français.](./README_fr.md)* +*[Read this README is other languages.](./ALL_README.md)* -> *This package allows you to install Luckysheet 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 Luckysheet 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 @@ -21,7 +21,7 @@ Luckysheet is an online spreadsheet that is powerful, simple to configure, and c **Shipped version:** 2.1.13~ynh2 -**Demo:** https://dream-num.github.io/LuckysheetDemo +**Demo:** ## Screenshots @@ -29,19 +29,19 @@ Luckysheet is an online spreadsheet that is powerful, simple to configure, and c ## Documentation and resources -* Official app website: -* Official admin documentation: -* Upstream app code repository: -* YunoHost Store: -* Report a bug: +- Official app website: +- Official admin documentation: +- Upstream app code repository: +- YunoHost Store: +- Report a bug: ## Developer info -Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/luckysheet_ynh/tree/testing). +Please send your pull request to the [`testing` branch](https://github.com/YunoHost-Apps/luckysheet_ynh/tree/testing). -To try the testing branch, please proceed like that. +To try the `testing` branch, please proceed like that: -``` bash +```bash sudo yunohost app install https://github.com/YunoHost-Apps/luckysheet_ynh/tree/testing --debug or sudo yunohost app upgrade luckysheet -u https://github.com/YunoHost-Apps/luckysheet_ynh/tree/testing --debug diff --git a/README_fr.md b/README_fr.md index e174594..fcf938c 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,6 +1,6 @@ # Luckysheet pour YunoHost @@ -9,19 +9,19 @@ It shall NOT be edited by hand. [![Installer Luckysheet avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=luckysheet) -*[Read this readme in english.](./README.md)* +*[Lire le README dans d'autres langues.](./ALL_README.md)* -> *Ce package vous permet d’installer Luckysheet 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 d’installer Luckysheet rapidement et simplement sur un serveur YunoHost.* +> *Si vous n’avez pas YunoHost, consultez [ce guide](https://yunohost.org/install) pour savoir comment l’installer et en profiter.* ## Vue d’ensemble Luckysheet est une feuille de calcul en ligne, puissante, simple à configurer et complètement open source. -**Version incluse :** 2.1.13~ynh2 +**Version incluse :** 2.1.13~ynh2 -**Démo :** https://dream-num.github.io/LuckysheetDemo +**Démo :** ## Captures d’écran @@ -29,22 +29,22 @@ Luckysheet est une feuille de calcul en ligne, puissante, simple à configurer e ## Documentations et ressources -* Site officiel de l’app : -* Documentation officielle de l’admin : -* Dépôt de code officiel de l’app : -* YunoHost Store: -* Signaler un bug : +- Site officiel de l’app : +- Documentation officielle de l’admin : +- Dépôt de code officiel de l’app : +- YunoHost Store : +- Signaler un bug : ## Informations pour les développeurs -Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/luckysheet_ynh/tree/testing). +Merci de faire vos pull request sur la [branche `testing`](https://github.com/YunoHost-Apps/luckysheet_ynh/tree/testing). -Pour essayer la branche testing, procédez comme suit. +Pour essayer la branche `testing`, procédez comme suit : -``` bash +```bash sudo yunohost app install https://github.com/YunoHost-Apps/luckysheet_ynh/tree/testing --debug ou sudo yunohost app upgrade luckysheet -u https://github.com/YunoHost-Apps/luckysheet_ynh/tree/testing --debug ``` -**Plus d’infos sur le packaging d’applications :** \ No newline at end of file +**Plus d’infos sur le packaging d’applications :** diff --git a/README_gl.md b/README_gl.md new file mode 100644 index 0000000..8627f67 --- /dev/null +++ b/README_gl.md @@ -0,0 +1,50 @@ + + +# Luckysheet para YunoHost + +[![Nivel de integración](https://dash.yunohost.org/integration/luckysheet.svg)](https://dash.yunohost.org/appci/app/luckysheet) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/luckysheet.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/luckysheet.maintain.svg) + +[![Instalar Luckysheet con YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=luckysheet) + +*[Le este README en outros idiomas.](./ALL_README.md)* + +> *Este paquete permíteche instalar Luckysheet 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 + +Luckysheet is an online spreadsheet that is powerful, simple to configure, and completely open source. + + +**Versión proporcionada:** 2.1.13~ynh2 + +**Demo:** + +## Capturas de pantalla + +![Captura de pantalla de Luckysheet](./doc/screenshots/screenshot.gif) + +## Documentación e recursos + +- Web oficial da app: +- Documentación oficial para admin: +- Repositorio de orixe do código: +- Tenda YunoHost: +- Informar dun problema: + +## Info de desenvolvemento + +Envía a túa colaboración á [rama `testing`](https://github.com/YunoHost-Apps/luckysheet_ynh/tree/testing). + +Para probar a rama `testing`, procede deste xeito: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/luckysheet_ynh/tree/testing --debug +ou +sudo yunohost app upgrade luckysheet -u https://github.com/YunoHost-Apps/luckysheet_ynh/tree/testing --debug +``` + +**Máis info sobre o empaquetado da app:** diff --git a/README_it.md b/README_it.md new file mode 100644 index 0000000..1014120 --- /dev/null +++ b/README_it.md @@ -0,0 +1,50 @@ + + +# Luckysheet per YunoHost + +[![Livello di integrazione](https://dash.yunohost.org/integration/luckysheet.svg)](https://dash.yunohost.org/appci/app/luckysheet) ![Stato di funzionamento](https://ci-apps.yunohost.org/ci/badges/luckysheet.status.svg) ![Stato di manutenzione](https://ci-apps.yunohost.org/ci/badges/luckysheet.maintain.svg) + +[![Installa Luckysheet con YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=luckysheet) + +*[Leggi questo README in altre lingue.](./ALL_README.md)* + +> *Questo pacchetto ti permette di installare Luckysheet su un server YunoHost in modo semplice e veloce.* +> *Se non hai YunoHost, consulta [la guida](https://yunohost.org/install) per imparare a installarlo.* + +## Panoramica + +Luckysheet is an online spreadsheet that is powerful, simple to configure, and completely open source. + + +**Versione pubblicata:** 2.1.13~ynh2 + +**Prova:** + +## Screenshot + +![Screenshot di Luckysheet](./doc/screenshots/screenshot.gif) + +## Documentazione e risorse + +- Sito web ufficiale dell’app: +- Documentazione ufficiale per gli amministratori: +- Repository upstream del codice dell’app: +- Store di YunoHost: +- Segnala un problema: + +## Informazioni per sviluppatori + +Si prega di inviare la tua pull request alla [branch di `testing`](https://github.com/YunoHost-Apps/luckysheet_ynh/tree/testing). + +Per provare la branch di `testing`, si prega di procedere in questo modo: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/luckysheet_ynh/tree/testing --debug +o +sudo yunohost app upgrade luckysheet -u https://github.com/YunoHost-Apps/luckysheet_ynh/tree/testing --debug +``` + +**Maggiori informazioni riguardo il pacchetto di quest’app:** From 4b6ccc1c14ce28fdf8a7983826bdeb87e69bd67d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Sun, 23 Jun 2024 13:33:01 +0200 Subject: [PATCH 2/3] Update READMEs --- ALL_README.md | 4 +++- README.md | 6 +++++- README_es.md | 54 +++++++++++++++++++++++++++++++++++++++++++++++ README_eu.md | 54 +++++++++++++++++++++++++++++++++++++++++++++++ README_fr.md | 4 ++++ README_gl.md | 4 ++++ README_zh_Hans.md | 54 +++++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 178 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..152f2e7 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) +- [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) -- [Leggi il “README” in italiano](README_it.md) +- [阅读中文(简体)的 README](README_zh_Hans.md) diff --git a/README.md b/README.md index 77abe76..dd0ae0c 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ It shall NOT be edited by hand. [![Install Luckysheet with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=luckysheet) -*[Read this README is other languages.](./ALL_README.md)* +*[Read this README in other languages.](./ALL_README.md)* > *This package allows you to install Luckysheet 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.* @@ -27,6 +27,10 @@ Luckysheet is an online spreadsheet that is powerful, simple to configure, and c ![Screenshot of Luckysheet](./doc/screenshots/screenshot.gif) +## :red_circle: Antifeatures + +- **Upstream not maintained**: This software is not maintained anymore. Expect it to break down over time, be exposed to unfixed security breaches, etc. + ## Documentation and resources - Official app website: diff --git a/README_es.md b/README_es.md new file mode 100644 index 0000000..8fea987 --- /dev/null +++ b/README_es.md @@ -0,0 +1,54 @@ + + +# Luckysheet para Yunohost + +[![Nivel de integración](https://dash.yunohost.org/integration/luckysheet.svg)](https://dash.yunohost.org/appci/app/luckysheet) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/luckysheet.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/luckysheet.maintain.svg) + +[![Instalar Luckysheet con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=luckysheet) + +*[Leer este README en otros idiomas.](./ALL_README.md)* + +> *Este paquete le permite instalarLuckysheet 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 + +Luckysheet is an online spreadsheet that is powerful, simple to configure, and completely open source. + + +**Versión actual:** 2.1.13~ynh2 + +**Demo:** + +## Capturas + +![Captura de Luckysheet](./doc/screenshots/screenshot.gif) + +## :red_circle: Características no deseables + +- **Upstream not maintained**: This software is not maintained anymore. Expect it to break down over time, be exposed to unfixed security breaches, etc. + +## Documentaciones y recursos + +- Sitio web 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/luckysheet_ynh/tree/testing + +Para probar la rama `testing`, sigue asÍ: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/luckysheet_ynh/tree/testing --debug +o +sudo yunohost app upgrade luckysheet -u https://github.com/YunoHost-Apps/luckysheet_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..97d8bd3 --- /dev/null +++ b/README_eu.md @@ -0,0 +1,54 @@ + + +# Luckysheet YunoHost-erako + +[![Integrazio maila](https://dash.yunohost.org/integration/luckysheet.svg)](https://dash.yunohost.org/appci/app/luckysheet) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/luckysheet.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/luckysheet.maintain.svg) + +[![Instalatu Luckysheet YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=luckysheet) + +*[Irakurri README hau beste hizkuntzatan.](./ALL_README.md)* + +> *Pakete honek Luckysheet YunoHost zerbitzari batean azkar eta zailtasunik gabe instalatzea ahalbidetzen dizu.* +> *YunoHost ez baduzu, kontsultatu [gida](https://yunohost.org/install) nola instalatu ikasteko.* + +## Aurreikuspena + +Luckysheet is an online spreadsheet that is powerful, simple to configure, and completely open source. + + +**Paketatutako bertsioa:** 2.1.13~ynh2 + +**Demoa:** + +## Pantaila-argazkiak + +![Luckysheet(r)en pantaila-argazkia](./doc/screenshots/screenshot.gif) + +## :red_circle: Ezaugarri zalantzagarriak + +- **Jatorrizko garapena utzita**: Software honek ez du arduradunik. Denborak aurrera egin ahala funtzionatzeari utziko dio, konpondu gabeko segurtasun arazoak izango ditu, etab. + +## Dokumentazioa eta baliabideak + +- Aplikazioaren webgune 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/luckysheet_ynh/tree/testing). + +`testing` abarra probatzeko, ondorengoa egin: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/luckysheet_ynh/tree/testing --debug +edo +sudo yunohost app upgrade luckysheet -u https://github.com/YunoHost-Apps/luckysheet_ynh/tree/testing --debug +``` + +**Informazio gehiago aplikazioaren paketatzeari buruz:** diff --git a/README_fr.md b/README_fr.md index fcf938c..0cf8e16 100644 --- a/README_fr.md +++ b/README_fr.md @@ -27,6 +27,10 @@ Luckysheet est une feuille de calcul en ligne, puissante, simple à configurer e ![Capture d’écran de Luckysheet](./doc/screenshots/screenshot.gif) +## :red_circle: Anti-fonctionnalités + +- **Application non maintenue **: Ce logiciel n'est plus maintenu. Attendez-vous à ce qu'il ne fonctionne plus avec le temps, et que l'on découvre des failles de sécurité qui ne seront pas corrigées, etc. + ## Documentations et ressources - Site officiel de l’app : diff --git a/README_gl.md b/README_gl.md index 8627f67..9e83695 100644 --- a/README_gl.md +++ b/README_gl.md @@ -27,6 +27,10 @@ Luckysheet is an online spreadsheet that is powerful, simple to configure, and c ![Captura de pantalla de Luckysheet](./doc/screenshots/screenshot.gif) +## :red_circle: Debes considerar + +- **Upstream not maintained**: This software is not maintained anymore. Expect it to break down over time, be exposed to unfixed security breaches, etc. + ## Documentación e recursos - Web oficial da app: diff --git a/README_zh_Hans.md b/README_zh_Hans.md new file mode 100644 index 0000000..21a8f69 --- /dev/null +++ b/README_zh_Hans.md @@ -0,0 +1,54 @@ + + +# YunoHost 上的 Luckysheet + +[![集成程度](https://dash.yunohost.org/integration/luckysheet.svg)](https://dash.yunohost.org/appci/app/luckysheet) ![工作状态](https://ci-apps.yunohost.org/ci/badges/luckysheet.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/luckysheet.maintain.svg) + +[![使用 YunoHost 安装 Luckysheet](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=luckysheet) + +*[阅读此 README 的其它语言版本。](./ALL_README.md)* + +> *通过此软件包,您可以在 YunoHost 服务器上快速、简单地安装 Luckysheet。* +> *如果您还没有 YunoHost,请参阅[指南](https://yunohost.org/install)了解如何安装它。* + +## 概况 + +Luckysheet is an online spreadsheet that is powerful, simple to configure, and completely open source. + + +**分发版本:** 2.1.13~ynh2 + +**演示:** + +## 截图 + +![Luckysheet 的截图](./doc/screenshots/screenshot.gif) + +## :red_circle: 负面特征 + +- **Upstream not maintained**: This software is not maintained anymore. Expect it to break down over time, be exposed to unfixed security breaches, etc. + +## 文档与资源 + +- 官方应用网站: +- 官方管理文档: +- 上游应用代码库: +- YunoHost 商店: +- 报告 bug: + +## 开发者信息 + +请向 [`testing` 分支](https://github.com/YunoHost-Apps/luckysheet_ynh/tree/testing) 发送拉取请求。 + +如要尝试 `testing` 分支,请这样操作: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/luckysheet_ynh/tree/testing --debug +或 +sudo yunohost app upgrade luckysheet -u https://github.com/YunoHost-Apps/luckysheet_ynh/tree/testing --debug +``` + +**有关应用打包的更多信息:** From 1cac9cd040a5adeaef2501dbc05044e7d485ca17 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Sat, 31 Aug 2024 01:02:51 +0200 Subject: [PATCH 3/3] [autopatch] Automatic patch attempt for helpers 2.1 --- manifest.toml | 4 ++- scripts/_common.sh | 14 +--------- scripts/backup | 17 +++--------- scripts/change_url | 14 ++-------- scripts/install | 54 ++++++++++++++++-------------------- scripts/remove | 14 +++------- scripts/restore | 29 +++++++------------- scripts/upgrade | 68 ++++++++++++++++++++-------------------------- 8 files changed, 77 insertions(+), 137 deletions(-) diff --git a/manifest.toml b/manifest.toml index 9d0753a..c3ecb52 100644 --- a/manifest.toml +++ b/manifest.toml @@ -20,7 +20,8 @@ code = "https://github.com/mengshukeji/Luckysheet" fund = "https://opencollective.com/luckysheet" [integration] -yunohost = ">= 11.2" +yunohost = ">= 11.2.18" +helpers_version = "2.1" architectures = "all" multi_instance = false ldap = false @@ -54,6 +55,7 @@ ram.runtime = "500M" [resources.system_user] [resources.install_dir] + group = "www-data:r-x" [resources.permissions] main.url = "/" diff --git a/scripts/_common.sh b/scripts/_common.sh index b818f0f..eaae793 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -1,19 +1,7 @@ #!/bin/bash #================================================= -# COMMON VARIABLES +# COMMON VARIABLES AND CUSTOM HELPERS #================================================= nodejs_version=16 - -#================================================= -# PERSONAL HELPERS -#================================================= - -#================================================= -# EXPERIMENTAL HELPERS -#================================================= - -#================================================= -# FUTURE OFFICIAL HELPERS -#================================================= diff --git a/scripts/backup b/scripts/backup index 1b73971..511556c 100644 --- a/scripts/backup +++ b/scripts/backup @@ -1,32 +1,23 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - # Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# DECLARE DATA AND CONF FILES TO BACKUP -#================================================= -ynh_print_info --message="Declaring files to be backed up..." +ynh_print_info "Declaring files to be backed up..." #================================================= # BACKUP THE APP MAIN DIR #================================================= -ynh_backup --src_path="$install_dir" +ynh_backup "$install_dir" #================================================= # SYSTEM CONFIGURATION #================================================= # Backup the nginx configuration -ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" +ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # SPECIFIC BACKUP @@ -34,4 +25,4 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" # END OF SCRIPT #================================================= -ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." +ynh_print_info "Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." diff --git a/scripts/change_url b/scripts/change_url index a4fcb69..39d37fc 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -1,25 +1,17 @@ #!/bin/bash -#================================================= -# GENERIC STARTING -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - source _common.sh source /usr/share/yunohost/helpers -#================================================= -# STANDARD MODIFICATIONS #================================================= # MODIFY URL IN NGINX CONF #================================================= -ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1 +ynh_script_progression "Updating NGINX web server configuration..." -ynh_change_url_nginx_config +ynh_config_change_url_nginx #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Change of URL completed for $app" --last +ynh_script_progression "Change of URL completed for $app" diff --git a/scripts/install b/scripts/install index 7947d6a..cd96c8e 100644 --- a/scripts/install +++ b/scripts/install @@ -1,74 +1,66 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - source _common.sh source /usr/share/yunohost/helpers #================================================= # INSTALL NODEJS #================================================= -ynh_script_progression --message="Installing NodeJS..." --weight=20 +ynh_script_progression "Installing NodeJS..." # Install Nodejs -ynh_install_nodejs --nodejs_version="$nodejs_version" +ynh_nodejs_install #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -ynh_script_progression --message="Setting up source files..." --weight=2 +ynh_script_progression "Setting up source files..." # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir/source" -chmod 750 "$install_dir" -chmod -R o-rwx "$install_dir" -chown -R "$app:www-data" "$install_dir" - +#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 750 "$install_dir" +#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir" +#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R "$app:www-data" "$install_dir" #================================================= # BUILD APP #================================================= -ynh_script_progression --message="Building app... (this will take some time and resources!)" --weight=20 +ynh_script_progression "Building app... (this will take some time and resources!)" pushd "$install_dir/source" - ynh_use_nodejs - ynh_exec_warn_less ynh_exec_as "$app" "$ynh_node_load_PATH" "$ynh_npm" install - ynh_exec_warn_less env "$ynh_node_load_PATH" "$ynh_npm" install gulp -g - ynh_exec_warn_less ynh_exec_as "$app" "$ynh_node_load_PATH" "$ynh_npm" run build + + ynh_hide_warnings ynh_exec_as_app node_load_PATH" npm install + ynh_hide_warnings env node_load_PATH" npm install gulp -g + ynh_hide_warnings ynh_exec_as_app node_load_PATH" npm run build popd -ynh_exec_as "$app" mv "$install_dir/source/dist" "$install_dir/live" +ynh_exec_as_app mv "$install_dir/source/dist" "$install_dir/live" -ynh_secure_remove --file="$install_dir/source" - -chmod 750 "$install_dir" -chmod -R o-rwx "$install_dir" -chown -R "$app:www-data" "$install_dir" +ynh_safe_rm "$install_dir/source" +#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 750 "$install_dir" +#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir" +#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R "$app:www-data" "$install_dir" #================================================= # ADD A CONFIGURATION #================================================= -ynh_script_progression --message="Adding a configuration file..." +ynh_script_progression "Adding $app's configuration..." -ynh_add_config --template="config.example.js" --destination="$install_dir/live/config.js" +ynh_config_add --template="config.example.js" --destination="$install_dir/live/config.js" -chmod 400 "$install_dir/live/config.js" -chown "$app:$app" "$install_dir/live/config.js" +#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 400 "$install_dir/live/config.js" +#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown "$app:$app" "$install_dir/live/config.js" #================================================= # SYSTEM CONFIGURATION #================================================= -ynh_script_progression --message="Adding system configurations related to $app..." --weight=1 +ynh_script_progression "Adding system configurations related to $app..." # Create a dedicated NGINX config -ynh_add_nginx_config +ynh_config_add_nginx #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Installation of $app completed" --last +ynh_script_progression "Installation of $app completed" diff --git a/scripts/remove b/scripts/remove index c030d6d..058e383 100644 --- a/scripts/remove +++ b/scripts/remove @@ -1,25 +1,19 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - source _common.sh source /usr/share/yunohost/helpers #================================================= # REMOVE SYSTEM CONFIGURATIONS #================================================= -ynh_script_progression --message="Removing system configurations related to $app..." --weight=1 +ynh_script_progression "Removing system configurations related to $app..." -ynh_remove_nginx_config +ynh_config_remove_nginx -ynh_remove_nodejs +ynh_nodejs_remove #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Removal of $app completed" --last +ynh_script_progression "Removal of $app completed" diff --git a/scripts/restore b/scripts/restore index 25c78ce..c7550b2 100644 --- a/scripts/restore +++ b/scripts/restore @@ -1,11 +1,5 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - # Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers @@ -13,32 +7,29 @@ source /usr/share/yunohost/helpers #================================================= # RESTORE THE APP MAIN DIR #================================================= -ynh_script_progression --message="Restoring the app main directory..." --weight=50 +ynh_script_progression "Restoring the app main directory..." -ynh_restore_file --origin_path="$install_dir" - -chmod 750 "$install_dir" -chmod -R o-rwx "$install_dir" -chown -R "$app:www-data" "$install_dir" +ynh_restore "$install_dir" +#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 750 "$install_dir" +#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir" +#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R "$app:www-data" "$install_dir" #================================================= # RESTORE SYSTEM CONFIGURATIONS #================================================= -ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1 +ynh_script_progression "Restoring system configurations related to $app..." -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" +ynh_restore "/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# GENERIC FINALIZATION #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=1 +ynh_script_progression "Reloading NGINX web server..." -ynh_systemd_action --service_name=nginx --action=reload +ynh_systemctl --service=nginx --action=reload #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Restoration completed for $app" --last +ynh_script_progression "Restoration completed for $app" diff --git a/scripts/upgrade b/scripts/upgrade index 1ef8b79..76c39ea 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -1,37 +1,29 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - source _common.sh source /usr/share/yunohost/helpers #================================================= # INSTALL NODEJS #================================================= -ynh_script_progression --message="Installing NodeJS..." --weight=20 +ynh_script_progression "Installing NodeJS..." # Install Nodejs -ynh_install_nodejs --nodejs_version="$nodejs_version" +ynh_nodejs_install -#================================================= -# STANDARD UPGRADE STEPS #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= -ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 +ynh_script_progression "Ensuring downward compatibility..." # 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; then - ynh_script_progression --message="Removing $app service integration..." --weight=1 +if ynh_hide_warnings yunohost service status $app >/dev/null; then + ynh_script_progression "Removing $app service integration..." yunohost service remove "$app" fi -ynh_app_setting_delete --app="$app" --key=port -ynh_remove_systemd_config +ynh_app_setting_delete --key=port +ynh_config_remove_systemd if [[ -d "$install_dir/src/" ]]; then mv "$install_dir/src" "$install_dir/live" @@ -40,58 +32,56 @@ fi #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -ynh_script_progression --message="Upgrading source files..." --weight=20 +ynh_script_progression "Upgrading source files..." # Download, check integrity, uncompress and patch the source from app.src -ynh_setup_source --dest_dir="$install_dir/source" --full_replace=1 - -chmod 750 "$install_dir" -chmod -R o-rwx "$install_dir" -chown -R "$app:www-data" "$install_dir" +ynh_setup_source --dest_dir="$install_dir/source" --full_replace +#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 750 "$install_dir" +#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir" +#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R "$app:www-data" "$install_dir" #================================================= # BUILD APP #================================================= -ynh_script_progression --message="Building app... (this will take some time and resources!)" --weight=20 +ynh_script_progression "Building app... (this will take some time and resources!)" pushd "$install_dir/source" - ynh_use_nodejs - ynh_exec_warn_less ynh_exec_as "$app" "$ynh_node_load_PATH" "$ynh_npm" install - ynh_exec_warn_less env "$ynh_node_load_PATH" "$ynh_npm" install gulp -g - ynh_exec_warn_less ynh_exec_as "$app" "$ynh_node_load_PATH" "$ynh_npm" run build + + ynh_hide_warnings ynh_exec_as_app node_load_PATH" npm install + ynh_hide_warnings env node_load_PATH" npm install gulp -g + ynh_hide_warnings ynh_exec_as_app node_load_PATH" npm run build popd mv "$install_dir/live/config.js" "$install_dir/config.js" -ynh_secure_remove --file="$install_dir/live" -ynh_exec_as "$app" mv "$install_dir/source/dist" "$install_dir/live" +ynh_safe_rm "$install_dir/live" +ynh_exec_as_app mv "$install_dir/source/dist" "$install_dir/live" mv "$install_dir/config.js" "$install_dir/live/config.js" -chmod 750 "$install_dir" -chmod -R o-rwx "$install_dir" -chown -R "$app:www-data" "$install_dir" - +#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 750 "$install_dir" +#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir" +#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R "$app:www-data" "$install_dir" #================================================= # UPDATE A CONFIG FILE #================================================= -ynh_script_progression --message="Updating a configuration file..." +ynh_script_progression "Updating configuration..." -ynh_add_config --template="config.example.js" --destination="$install_dir/live/config.js" +ynh_config_add --template="config.example.js" --destination="$install_dir/live/config.js" -chmod 400 "$install_dir/live/config.js" -chown "$app:$app" "$install_dir/live/config.js" +#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 400 "$install_dir/live/config.js" +#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown "$app:$app" "$install_dir/live/config.js" #================================================= # REAPPLY SYSTEM CONFIGURATIONS #================================================= -ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1 +ynh_script_progression "Upgrading system configurations related to $app..." # Create a dedicated NGINX config -ynh_add_nginx_config +ynh_config_add_nginx #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Upgrade of $app completed" --last +ynh_script_progression "Upgrade of $app completed"