1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/luckysheet_ynh.git synced 2024-09-03 19:36:21 +02:00
This commit is contained in:
YunoHost Bot 2024-08-31 13:08:41 +02:00 committed by GitHub
commit cb959099fc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 388 additions and 166 deletions

8
ALL_README.md Normal file
View file

@ -0,0 +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)
- [阅读中文(简体)的 README](README_zh_Hans.md)

View file

@ -1,5 +1,5 @@
<!--
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator
N.B.: This README was automatically generated by <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
It shall NOT be edited by hand.
-->
@ -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 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.*
> *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,27 +21,31 @@ 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:** <https://dream-num.github.io/LuckysheetDemo>
## Screenshots
![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: <https://dream-num.github.io/LuckysheetDocs/>
* Official admin documentation: <https://dream-num.github.io/LuckysheetDocs/guide/>
* Upstream app code repository: <https://github.com/mengshukeji/Luckysheet>
* YunoHost Store: <https://apps.yunohost.org/app/luckysheet>
* Report a bug: <https://github.com/YunoHost-Apps/luckysheet_ynh/issues>
- Official app website: <https://dream-num.github.io/LuckysheetDocs/>
- Official admin documentation: <https://dream-num.github.io/LuckysheetDocs/guide/>
- Upstream app code repository: <https://github.com/mengshukeji/Luckysheet>
- YunoHost Store: <https://apps.yunohost.org/app/luckysheet>
- Report a bug: <https://github.com/YunoHost-Apps/luckysheet_ynh/issues>
## 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

54
README_es.md Normal file
View file

@ -0,0 +1,54 @@
<!--
Este archivo README esta generado automaticamente<https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
No se debe editar a mano.
-->
# 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:** <https://dream-num.github.io/LuckysheetDemo>
## 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: <https://dream-num.github.io/LuckysheetDocs/>
- Documentación administrador oficial: <https://dream-num.github.io/LuckysheetDocs/guide/>
- Repositorio del código fuente oficial de la aplicación : <https://github.com/mengshukeji/Luckysheet>
- Catálogo YunoHost: <https://apps.yunohost.org/app/luckysheet>
- Reportar un error: <https://github.com/YunoHost-Apps/luckysheet_ynh/issues>
## 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:** <https://yunohost.org/packaging_apps>

54
README_eu.md Normal file
View file

@ -0,0 +1,54 @@
<!--
Ohart ongi: README hau automatikoki sortu da <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>ri esker
EZ editatu eskuz.
-->
# 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:** <https://dream-num.github.io/LuckysheetDemo>
## 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: <https://dream-num.github.io/LuckysheetDocs/>
- Administratzaileen dokumentazio ofiziala: <https://dream-num.github.io/LuckysheetDocs/guide/>
- Jatorrizko aplikazioaren kode-gordailua: <https://github.com/mengshukeji/Luckysheet>
- YunoHost Denda: <https://apps.yunohost.org/app/luckysheet>
- Eman errore baten berri: <https://github.com/YunoHost-Apps/luckysheet_ynh/issues>
## 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:** <https://yunohost.org/packaging_apps>

View file

@ -1,6 +1,6 @@
<!--
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator
It shall NOT be edited by hand.
Nota bene: ce README est automatiquement généré par <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
Il NE doit PAS être modifié à la main.
-->
# Luckysheet pour YunoHost
@ -9,42 +9,46 @@ 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 dinstaller Luckysheet rapidement et simplement sur un serveur YunoHost.
Si vous navez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment linstaller et en profiter.*
> *Ce package vous permet dinstaller Luckysheet rapidement et simplement sur un serveur YunoHost.*
> *Si vous navez pas YunoHost, consultez [ce guide](https://yunohost.org/install) pour savoir comment linstaller et en profiter.*
## Vue densemble
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:** <https://dream-num.github.io/LuckysheetDemo>
## Captures décran
![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 lapp : <https://dream-num.github.io/LuckysheetDocs/>
* Documentation officielle de ladmin : <https://dream-num.github.io/LuckysheetDocs/guide/>
* Dépôt de code officiel de lapp : <https://github.com/mengshukeji/Luckysheet>
* YunoHost Store: <https://apps.yunohost.org/app/luckysheet>
* Signaler un bug : <https://github.com/YunoHost-Apps/luckysheet_ynh/issues>
- Site officiel de lapp: <https://dream-num.github.io/LuckysheetDocs/>
- Documentation officielle de ladmin: <https://dream-num.github.io/LuckysheetDocs/guide/>
- Dépôt de code officiel de lapp: <https://github.com/mengshukeji/Luckysheet>
- YunoHost Store: <https://apps.yunohost.org/app/luckysheet>
- Signaler un bug: <https://github.com/YunoHost-Apps/luckysheet_ynh/issues>
## 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 dinfos sur le packaging dapplications :** <https://yunohost.org/packaging_apps>
**Plus dinfos sur le packaging dapplications:** <https://yunohost.org/packaging_apps>

54
README_gl.md Normal file
View file

@ -0,0 +1,54 @@
<!--
NOTA: Este README foi creado automáticamente por <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
NON debe editarse manualmente.
-->
# 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:** <https://dream-num.github.io/LuckysheetDemo>
## Capturas de pantalla
![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: <https://dream-num.github.io/LuckysheetDocs/>
- Documentación oficial para admin: <https://dream-num.github.io/LuckysheetDocs/guide/>
- Repositorio de orixe do código: <https://github.com/mengshukeji/Luckysheet>
- Tenda YunoHost: <https://apps.yunohost.org/app/luckysheet>
- Informar dun problema: <https://github.com/YunoHost-Apps/luckysheet_ynh/issues>
## 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:** <https://yunohost.org/packaging_apps>

50
README_it.md Normal file
View file

@ -0,0 +1,50 @@
<!--
N.B.: Questo README è stato automaticamente generato da <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
NON DEVE essere modificato manualmente.
-->
# 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:** <https://dream-num.github.io/LuckysheetDemo>
## Screenshot
![Screenshot di Luckysheet](./doc/screenshots/screenshot.gif)
## Documentazione e risorse
- Sito web ufficiale dellapp: <https://dream-num.github.io/LuckysheetDocs/>
- Documentazione ufficiale per gli amministratori: <https://dream-num.github.io/LuckysheetDocs/guide/>
- Repository upstream del codice dellapp: <https://github.com/mengshukeji/Luckysheet>
- Store di YunoHost: <https://apps.yunohost.org/app/luckysheet>
- Segnala un problema: <https://github.com/YunoHost-Apps/luckysheet_ynh/issues>
## 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 questapp:** <https://yunohost.org/packaging_apps>

54
README_zh_Hans.md Normal file
View file

@ -0,0 +1,54 @@
<!--
注意:此 README 由 <https://github.com/YunoHost/apps/tree/master/tools/readme_generator> 自动生成
请勿手动编辑。
-->
# 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
**演示:** <https://dream-num.github.io/LuckysheetDemo>
## 截图
![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.
## 文档与资源
- 官方应用网站: <https://dream-num.github.io/LuckysheetDocs/>
- 官方管理文档: <https://dream-num.github.io/LuckysheetDocs/guide/>
- 上游应用代码库: <https://github.com/mengshukeji/Luckysheet>
- YunoHost 商店: <https://apps.yunohost.org/app/luckysheet>
- 报告 bug <https://github.com/YunoHost-Apps/luckysheet_ynh/issues>
## 开发者信息
请向 [`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
```
**有关应用打包的更多信息:** <https://yunohost.org/packaging_apps>

View file

@ -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 = "/"

View file

@ -1,19 +1,7 @@
#!/bin/bash
#=================================================
# COMMON VARIABLES
# COMMON VARIABLES AND CUSTOM HELPERS
#=================================================
nodejs_version=16
#=================================================
# PERSONAL HELPERS
#=================================================
#=================================================
# EXPERIMENTAL HELPERS
#=================================================
#=================================================
# FUTURE OFFICIAL HELPERS
#=================================================

View file

@ -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)."

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"