1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/zerobin_ynh.git synced 2024-09-03 18:06:01 +02:00

Merge branch 'testing' into pr/54

This commit is contained in:
Éric Gaspar 2024-06-06 09:35:42 +02:00
commit 649d18ba0d
14 changed files with 238 additions and 117 deletions

6
ALL_README.md Normal file
View file

@ -0,0 +1,6 @@
# All available README files by language
- [Read the README in English](README.md)
- [Irakurri README euskaraz](README_eu.md)
- [Lire le README en français](README_fr.md)
- [Le o README en galego](README_gl.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. It shall NOT be edited by hand.
--> -->
@ -9,10 +9,10 @@ It shall NOT be edited by hand.
[![Install Zerobin with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=zerobin) [![Install Zerobin with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=zerobin)
*[Lire ce readme en français.](./README_fr.md)* *[Read this README in other languages.](./ALL_README.md)*
> *This package allows you to install Zerobin quickly and simply on a YunoHost server. > *This package allows you to install Zerobin quickly and simply on a YunoHost server.*
If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.* > *If you don't have YunoHost, please consult [the guide](https://yunohost.org/install) to learn how to install it.*
## Overview ## Overview
@ -23,43 +23,33 @@ Data is encrypted/decrypted in the browser using 256bit AES in Galois Counter mo
This is a fork of ZeroBin, originally developed by Sébastien Sauvage. It was refactored to allow easier and cleaner extensions and has now much more features than the original. It is however still fully compatible to the original ZeroBin 0.19 data storage scheme. Therefore such installations can be upgraded to this fork without loosing any data. This is a fork of ZeroBin, originally developed by Sébastien Sauvage. It was refactored to allow easier and cleaner extensions and has now much more features than the original. It is however still fully compatible to the original ZeroBin 0.19 data storage scheme. Therefore such installations can be upgraded to this fork without loosing any data.
**Shipped version:** 1.3.5~ynh3 **Shipped version:** 1.7.1~ynh1
**Demo:** https://privatebin.net/ **Demo:** <https://privatebin.net/>
## Screenshots ## Screenshots
![Screenshot of Zerobin](./doc/screenshots/screenshot.png) ![Screenshot of Zerobin](./doc/screenshots/screenshot.png)
## Disclaimers / important information
## Additional information
In the [update documentation](https://github.com/PrivateBin/PrivateBin/wiki/Configuration#zerobincompatibility) of PrivateBin, it is specified that:
For full compatibility with ZeroBin and to be able to decrypt old pastes, you would enable this option. However this is not recommend for new installations as it weakens the security of your PrivateBin instance.
This means that we have decided to delete the directory that allows us to save the data. You can save the 'data' directory, if you want to keep your data. But you should know that this weakens the security of this application.
## :red_circle: Antifeatures ## :red_circle: Antifeatures
- **Replaced by another app**: Was replaced by another app. Please refer to the README. - **Replaced by another app**: Was replaced by another app. Please refer to the README.
## Documentation and resources ## Documentation and resources
* Official app website: <https://privatebin.info/> - Official app website: <https://privatebin.info/>
* Official admin documentation: <https://github.com/PrivateBin/PrivateBin/wiki> - Official admin documentation: <https://github.com/PrivateBin/PrivateBin/wiki>
* Upstream app code repository: <https://github.com/PrivateBin/PrivateBin> - Upstream app code repository: <https://github.com/PrivateBin/PrivateBin>
* YunoHost documentation for this app: <https://yunohost.org/app_zerobin> - YunoHost Store: <https://apps.yunohost.org/app/zerobin>
* Report a bug: <https://github.com/YunoHost-Apps/zerobin_ynh/issues> - Report a bug: <https://github.com/YunoHost-Apps/zerobin_ynh/issues>
## Developer info ## Developer info
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/zerobin_ynh/tree/testing). Please send your pull request to the [`testing` branch](https://github.com/YunoHost-Apps/zerobin_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/zerobin_ynh/tree/testing --debug sudo yunohost app install https://github.com/YunoHost-Apps/zerobin_ynh/tree/testing --debug
or or
sudo yunohost app upgrade zerobin -u https://github.com/YunoHost-Apps/zerobin_ynh/tree/testing --debug sudo yunohost app upgrade zerobin -u https://github.com/YunoHost-Apps/zerobin_ynh/tree/testing --debug

58
README_eu.md Normal file
View file

@ -0,0 +1,58 @@
<!--
Ohart ongi: README hau automatikoki sortu da <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>ri esker
EZ editatu eskuz.
-->
# Zerobin YunoHost-erako
[![Integrazio maila](https://dash.yunohost.org/integration/zerobin.svg)](https://dash.yunohost.org/appci/app/zerobin) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/zerobin.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/zerobin.maintain.svg)
[![Instalatu Zerobin YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=zerobin)
*[Irakurri README hau beste hizkuntzatan.](./ALL_README.md)*
> *Pakete honek Zerobin YunoHost zerbitzari batean azkar eta zailtasunik gabe instalatzea ahalbidetzen dizu.*
> *YunoHost ez baduzu, kontsultatu [gida](https://yunohost.org/install) nola instalatu ikasteko.*
## Aurreikuspena
PrivateBin is a minimalist, open source online pastebin where the server has zero knowledge of pasted data.
Data is encrypted/decrypted in the browser using 256bit AES in Galois Counter mode.
This is a fork of ZeroBin, originally developed by Sébastien Sauvage. It was refactored to allow easier and cleaner extensions and has now much more features than the original. It is however still fully compatible to the original ZeroBin 0.19 data storage scheme. Therefore such installations can be upgraded to this fork without loosing any data.
**Paketatutako bertsioa:** 1.7.1~ynh1
**Demoa:** <https://privatebin.net/>
## Pantaila-argazkiak
![Zerobin(r)en pantaila-argazkia](./doc/screenshots/screenshot.png)
## :red_circle: Ezaugarri zalantzagarriak
- **Beste aplikazio batek ordeztu du**: Beste aplikazio batek ordeztu du. Irakurri README fitxategia.
## Dokumentazioa eta baliabideak
- Aplikazioaren webgune ofiziala: <https://privatebin.info/>
- Administratzaileen dokumentazio ofiziala: <https://github.com/PrivateBin/PrivateBin/wiki>
- Jatorrizko aplikazioaren kode-gordailua: <https://github.com/PrivateBin/PrivateBin>
- YunoHost Denda: <https://apps.yunohost.org/app/zerobin>
- Eman errore baten berri: <https://github.com/YunoHost-Apps/zerobin_ynh/issues>
## Garatzaileentzako informazioa
Bidali `pull request`a [`testing` abarrera](https://github.com/YunoHost-Apps/zerobin_ynh/tree/testing).
`testing` abarra probatzeko, ondorengoa egin:
```bash
sudo yunohost app install https://github.com/YunoHost-Apps/zerobin_ynh/tree/testing --debug
edo
sudo yunohost app upgrade zerobin -u https://github.com/YunoHost-Apps/zerobin_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 Nota bene: ce README est automatiquement généré par <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
It shall NOT be edited by hand. Il NE doit PAS être modifié à la main.
--> -->
# Zerobin pour YunoHost # Zerobin pour YunoHost
@ -9,10 +9,10 @@ It shall NOT be edited by hand.
[![Installer Zerobin avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=zerobin) [![Installer Zerobin avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=zerobin)
*[Read this readme in english.](./README.md)* *[Lire le README dans d'autres langues.](./ALL_README.md)*
> *Ce package vous permet dinstaller Zerobin rapidement et simplement sur un serveur YunoHost. > *Ce package vous permet dinstaller Zerobin 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.* > *Si vous navez pas YunoHost, consultez [ce guide](https://yunohost.org/install) pour savoir comment linstaller et en profiter.*
## Vue densemble ## Vue densemble
@ -24,46 +24,36 @@ Ce projet est un fork de ZeroBin, développé à l'origine par Sébastien Sauvag
Il reste cependant compatible avec le schéma original de stockage des données Zerobin 0.19. Ainsi toutes les installations peuvent être mises à jour vers ce projet, sans perte de données. Il reste cependant compatible avec le schéma original de stockage des données Zerobin 0.19. Ainsi toutes les installations peuvent être mises à jour vers ce projet, sans perte de données.
**Version incluse :** 1.3.5~ynh3 **Version incluse:** 1.7.1~ynh1
**Démo :** https://privatebin.net/ **Démo:** <https://privatebin.net/>
## Captures décran ## Captures décran
![Capture décran de Zerobin](./doc/screenshots/screenshot.png) ![Capture décran de Zerobin](./doc/screenshots/screenshot.png)
## Avertissements / informations importantes ## :red_circle: Anti-fonctionnalités
## Informations additionnelles - **Remplacé par une autre application **: A été remplacé par une autre application. Se référer au fichier README.
Dans la [documentation de mise à jour](https://github.com/PrivateBin/PrivateBin/wiki/Configuration#zerobincompatibility) de PrivateBin, il est précisé que :
Pour une compatibilité complète avec Zerobin et le déchiffrement de tous les vieux "paste", vous devriez activer cette option. Cependant, ce n'est pas recommandé pour les nouvelles installations car cela affaiblit la sécurité de votre instance PrivateBin.
Ceci signifie que nous avons décidé de supprimer ce répertoire pour permettre la sécurisation des données. Vous pouvez sauvegarder le répertoire 'data', si vous voulez conservez vos données. Mais vous devriez savoir que cela réduit la sécurité de votre application.
## :red_circle: Fonctions indésirables
- **Replaced by another app**: Was replaced by another app. Please refer to the README.
## Documentations et ressources ## Documentations et ressources
* Site officiel de lapp : <https://privatebin.info/> - Site officiel de lapp: <https://privatebin.info/>
* Documentation officielle de ladmin : <https://github.com/PrivateBin/PrivateBin/wiki> - Documentation officielle de ladmin: <https://github.com/PrivateBin/PrivateBin/wiki>
* Dépôt de code officiel de lapp : <https://github.com/PrivateBin/PrivateBin> - Dépôt de code officiel de lapp: <https://github.com/PrivateBin/PrivateBin>
* Documentation YunoHost pour cette app : <https://yunohost.org/app_zerobin> - YunoHost Store: <https://apps.yunohost.org/app/zerobin>
* Signaler un bug : <https://github.com/YunoHost-Apps/zerobin_ynh/issues> - Signaler un bug: <https://github.com/YunoHost-Apps/zerobin_ynh/issues>
## Informations pour les développeurs ## Informations pour les développeurs
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/zerobin_ynh/tree/testing). Merci de faire vos pull request sur la [branche `testing`](https://github.com/YunoHost-Apps/zerobin_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/zerobin_ynh/tree/testing --debug sudo yunohost app install https://github.com/YunoHost-Apps/zerobin_ynh/tree/testing --debug
ou ou
sudo yunohost app upgrade zerobin -u https://github.com/YunoHost-Apps/zerobin_ynh/tree/testing --debug sudo yunohost app upgrade zerobin -u https://github.com/YunoHost-Apps/zerobin_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>

58
README_gl.md Normal file
View file

@ -0,0 +1,58 @@
<!--
NOTA: Este README foi creado automáticamente por <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
NON debe editarse manualmente.
-->
# Zerobin para YunoHost
[![Nivel de integración](https://dash.yunohost.org/integration/zerobin.svg)](https://dash.yunohost.org/appci/app/zerobin) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/zerobin.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/zerobin.maintain.svg)
[![Instalar Zerobin con YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=zerobin)
*[Le este README en outros idiomas.](./ALL_README.md)*
> *Este paquete permíteche instalar Zerobin 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
PrivateBin is a minimalist, open source online pastebin where the server has zero knowledge of pasted data.
Data is encrypted/decrypted in the browser using 256bit AES in Galois Counter mode.
This is a fork of ZeroBin, originally developed by Sébastien Sauvage. It was refactored to allow easier and cleaner extensions and has now much more features than the original. It is however still fully compatible to the original ZeroBin 0.19 data storage scheme. Therefore such installations can be upgraded to this fork without loosing any data.
**Versión proporcionada:** 1.7.1~ynh1
**Demo:** <https://privatebin.net/>
## Capturas de pantalla
![Captura de pantalla de Zerobin](./doc/screenshots/screenshot.png)
## :red_circle: Caraterísticas cuestionables
- **Replaced by another app**: Was replaced by another app. Please refer to the README.
## Documentación e recursos
- Web oficial da app: <https://privatebin.info/>
- Documentación oficial para admin: <https://github.com/PrivateBin/PrivateBin/wiki>
- Repositorio de orixe do código: <https://github.com/PrivateBin/PrivateBin>
- Tenda YunoHost: <https://apps.yunohost.org/app/zerobin>
- Informar dun problema: <https://github.com/YunoHost-Apps/zerobin_ynh/issues>
## Info de desenvolvemento
Envía a túa colaboración á [rama `testing`](https://github.com/YunoHost-Apps/zerobin_ynh/tree/testing).
Para probar a rama `testing`, procede deste xeito:
```bash
sudo yunohost app install https://github.com/YunoHost-Apps/zerobin_ynh/tree/testing --debug
ou
sudo yunohost app upgrade zerobin -u https://github.com/YunoHost-Apps/zerobin_ynh/tree/testing --debug
```
**Máis info sobre o empaquetado da app:** <https://yunohost.org/packaging_apps>

68
README_it.md Normal file
View file

@ -0,0 +1,68 @@
<!--
N.B.: Questo README è stato automaticamente generato da <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
NON DEVE essere modificato manualmente.
-->
# Zerobin per YunoHost
[![Livello di integrazione](https://dash.yunohost.org/integration/zerobin.svg)](https://dash.yunohost.org/appci/app/zerobin) ![Stato di funzionamento](https://ci-apps.yunohost.org/ci/badges/zerobin.status.svg) ![Stato di manutenzione](https://ci-apps.yunohost.org/ci/badges/zerobin.maintain.svg)
[![Installa Zerobin con YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=zerobin)
*[Leggi questo README in altre lingue.](./ALL_README.md)*
> *Questo pacchetto ti permette di installare Zerobin 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
PrivateBin is a minimalist, open source online pastebin where the server has zero knowledge of pasted data.
Data is encrypted/decrypted in the browser using 256bit AES in Galois Counter mode.
This is a fork of ZeroBin, originally developed by Sébastien Sauvage. It was refactored to allow easier and cleaner extensions and has now much more features than the original. It is however still fully compatible to the original ZeroBin 0.19 data storage scheme. Therefore such installations can be upgraded to this fork without loosing any data.
**Versione pubblicata:** 1.3.5~ynh3
**Prova:** <https://privatebin.net/>
## Screenshot
![Screenshot di Zerobin](./doc/screenshots/screenshot.png)
## Attenzione/informazioni importanti
## Additional information
In the [update documentation](https://github.com/PrivateBin/PrivateBin/wiki/Configuration#zerobincompatibility) of PrivateBin, it is specified that:
For full compatibility with ZeroBin and to be able to decrypt old pastes, you would enable this option. However this is not recommend for new installations as it weakens the security of your PrivateBin instance.
This means that we have decided to delete the directory that allows us to save the data. You can save the 'data' directory, if you want to keep your data. But you should know that this weakens the security of this application.
## :red_circle: Anti-funzionalità
- **Sostituita da unaltra app**: Questapp è stata sostituita da unaltra app. Fare riferimento al file “README”.
## Documentazione e risorse
- Sito web ufficiale dellapp: <https://privatebin.info/>
- Documentazione ufficiale per gli amministratori: <https://github.com/PrivateBin/PrivateBin/wiki>
- Repository upstream del codice dellapp: <https://github.com/PrivateBin/PrivateBin>
- Store di YunoHost: <https://apps.yunohost.org/app/zerobin>
- Segnala un problema: <https://github.com/YunoHost-Apps/zerobin_ynh/issues>
## Informazioni per sviluppatori
Si prega di inviare la tua pull request alla [branch di `testing`](https://github.com/YunoHost-Apps/zerobin_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/zerobin_ynh/tree/testing --debug
o
sudo yunohost app upgrade zerobin -u https://github.com/YunoHost-Apps/zerobin_ynh/tree/testing --debug
```
**Maggiori informazioni riguardo il pacchetto di questapp:** <https://yunohost.org/packaging_apps>

View file

@ -1,7 +0,0 @@
## Additional information
In the [update documentation](https://github.com/PrivateBin/PrivateBin/wiki/Configuration#zerobincompatibility) of PrivateBin, it is specified that:
For full compatibility with ZeroBin and to be able to decrypt old pastes, you would enable this option. However this is not recommend for new installations as it weakens the security of your PrivateBin instance.
This means that we have decided to delete the directory that allows us to save the data. You can save the 'data' directory, if you want to keep your data. But you should know that this weakens the security of this application.

View file

@ -1,7 +0,0 @@
## Informations additionnelles
Dans la [documentation de mise à jour](https://github.com/PrivateBin/PrivateBin/wiki/Configuration#zerobincompatibility) de PrivateBin, il est précisé que :
Pour une compatibilité complète avec Zerobin et le déchiffrement de tous les vieux "paste", vous devriez activer cette option. Cependant, ce n'est pas recommandé pour les nouvelles installations car cela affaiblit la sécurité de votre instance PrivateBin.
Ceci signifie que nous avons décidé de supprimer ce répertoire pour permettre la sécurisation des données. Vous pouvez sauvegarder le répertoire 'data', si vous voulez conservez vos données. Mais vous devriez savoir que cela réduit la sécurité de votre application.

View file

@ -9,7 +9,7 @@ description.fr = "Pastebin minimaliste où le serveur n'a aucune connaissance de
version = "1.7.1~ynh1" version = "1.7.1~ynh1"
maintainers = ["julien"] maintainers = []
[upstream] [upstream]
license = "Zlib" license = "Zlib"
@ -19,7 +19,7 @@ admindoc = "https://github.com/PrivateBin/PrivateBin/wiki"
code = "https://github.com/PrivateBin/PrivateBin" code = "https://github.com/PrivateBin/PrivateBin"
[integration] [integration]
yunohost = ">= 4.3.0" yunohost = ">= 11.2"
architectures = "all" architectures = "all"
multi_instance = true multi_instance = true
ldap = false ldap = false
@ -30,11 +30,9 @@ ram.runtime = "50M"
[install] [install]
[install.domain] [install.domain]
# this is a generic question - ask strings are automatically handled by Yunohost's core
type = "domain" type = "domain"
[install.path] [install.path]
# this is a generic question - ask strings are automatically handled by Yunohost's core
type = "path" type = "path"
default = "/zerobin" default = "/zerobin"

View file

@ -28,15 +28,11 @@ ynh_backup --src_path="$install_dir"
ynh_backup --src_path="$data_dir" --is_big=1 ynh_backup --src_path="$data_dir" --is_big=1
#================================================= #=================================================
# BACKUP THE NGINX CONFIGURATION # SYSTEM CONFIGURATION
#================================================= #=================================================
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# BACKUP THE PHP-FPM CONFIGURATION
#=================================================
ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
#================================================= #=================================================

View file

@ -25,18 +25,13 @@ chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir" chown -R $app:www-data "$install_dir"
#================================================= #=================================================
# PHP-FPM CONFIGURATION # SYSTEM CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Configuring PHP-FPM..." --weight=2 ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
# Create a dedicated PHP-FPM config # Create a dedicated PHP-FPM config
ynh_add_fpm_config ynh_add_fpm_config
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Configuring NGINX web server..." --weight=2
# Create a dedicated NGINX config # Create a dedicated NGINX config
ynh_add_nginx_config ynh_add_nginx_config

View file

@ -10,18 +10,13 @@ source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
#================================================= #=================================================
# REMOVE NGINX CONFIGURATION # REMOVE SYSTEM CONFIGURATIONS
#================================================= #=================================================
ynh_script_progression --message="Removing NGINX web server configuration..." --weight=3 ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
# Remove the dedicated NGINX config # Remove the dedicated NGINX config
ynh_remove_nginx_config ynh_remove_nginx_config
#=================================================
# REMOVE PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=1
# Remove the dedicated PHP-FPM config # Remove the dedicated PHP-FPM config
ynh_remove_fpm_config ynh_remove_fpm_config

View file

@ -26,7 +26,6 @@ chown -R $app:www-data "$install_dir"
#================================================= #=================================================
# RESTORE THE DATA DIR # RESTORE THE DATA DIR
#================================================= #=================================================
ynh_script_progression --message="Restoring the data directory..." --weight=6 ynh_script_progression --message="Restoring the data directory..." --weight=6
ynh_restore_file --origin_path="$data_dir" ynh_restore_file --origin_path="$data_dir"
@ -36,17 +35,12 @@ chmod -R o-rwx "$data_dir"
chown -R $app:$app "$data_dir" chown -R $app:$app "$data_dir"
#================================================= #=================================================
# RESTORE THE PHP-FPM CONFIGURATION # RESTORE SYSTEM CONFIGURATIONS
#================================================= #=================================================
ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weight=1 ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
#=================================================
# RESTORE THE NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#================================================= #=================================================

View file

@ -9,33 +9,25 @@
source _common.sh source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
#=================================================
# CHECK VERSION
#=================================================
ynh_script_progression --message="Checking version..."
upgrade_type=$(ynh_check_app_version_changed)
#================================================= #=================================================
# STANDARD UPGRADE STEPS # STANDARD UPGRADE STEPS
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================
ynh_script_progression --message="Upgrading source files..." --weight=3
if ynh_compare_current_package_version --comparison lt --version "1.7.1~ynh1"; then if ynh_compare_current_package_version --comparison lt --version "1.7.1~ynh1"; then
ynh_script_progression --message="Moving data..." --weight=3 ynh_script_progression --message="Moving data..." --weight=3
mv $install_dir/data/* $data_dir/ mv $install_dir/data/* $data_dir/
fi fi
if [ "$upgrade_type" == "UPGRADE_APP" ] ynh_script_progression --message="Upgrading source files..." --weight=3
then
ynh_script_progression --message="Upgrading source files..." --weight=3
# Download, check integrity, uncompress and patch the source from app.src # Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir" --full_replace=1 ynh_setup_source --dest_dir="$install_dir" --full_replace=1
fi
ynh_script_progression --message="Upgrading config file..." --weight=1 ynh_script_progression --message="Upgrading config file..." --weight=1
ynh_add_config --template="conf.php" --destination="$install_dir/cfg/conf.php" ynh_add_config --template="conf.php" --destination="$install_dir/cfg/conf.php"
chmod 750 "$install_dir" chmod 750 "$install_dir"
@ -43,18 +35,13 @@ chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir" chown -R $app:www-data "$install_dir"
#================================================= #=================================================
# PHP-FPM CONFIGURATION # REAPPLY SYSTEM CONFIGURATIONS
#================================================= #=================================================
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=3 ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1
# Create a dedicated PHP-FPM config # Create a dedicated PHP-FPM config
ynh_add_fpm_config ynh_add_fpm_config
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2
# Create a dedicated NGINX config # Create a dedicated NGINX config
ynh_add_nginx_config ynh_add_nginx_config