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

Merge pull request #5 from YunoHost-Apps/testing

This commit is contained in:
Benoît 2022-01-02 15:11:47 +01:00 committed by GitHub
commit a9e840e461
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 349 additions and 167 deletions

View file

@ -3,18 +3,18 @@ N.B.: This README was automatically generated by https://github.com/YunoHost/app
It shall NOT be edited by hand. It shall NOT be edited by hand.
--> -->
# Armadietto package for Yunohost # Armadietto for YunoHost
[![Integration level](https://dash.yunohost.org/integration/armadietto.svg)](https://dash.yunohost.org/appci/app/armadietto) ![](https://ci-apps.yunohost.org/ci/badges/armadietto.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/armadietto.maintain.svg)
[![Integration level](https://dash.yunohost.org/integration/armadietto.svg)](https://dash.yunohost.org/appci/app/armadietto) ![](https://ci-apps.yunohost.org/ci/badges/armadietto.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/armadietto.maintain.svg)
[![Install Armadietto with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=armadietto) [![Install Armadietto with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=armadietto)
*[Lire ce readme en français.](./README_fr.md)* *[Lire ce readme en français.](./README_fr.md)*
> *This package allows you to install example quickly and simply on a YunoHost server. > *This package allows you to install Armadietto 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.*
## Armadietto overview ## Overview
[Armadietto](https://github.com/remotestorage/armadietto/) is a [remoteStorage](https://remotestorage.io) server written for Node.js. [Armadietto](https://github.com/remotestorage/armadietto/) is a [remoteStorage](https://remotestorage.io) server written for Node.js.
@ -29,39 +29,85 @@ Armadietto is maintained by remoteStorage Team [IRC](https://kiwiirc.com/client/
**Shipped version:** 0.1.5 **Shipped version:** 0.1.5
### Application for remoteStorage
[Click here](https://remotestorage.io/apps/) to see the list of applications that can be used with RemoteStorage.
### Features
- liste des caractéristiques...
**Shipped version:** 0.0.2~ynh6
## Screenshots ## Screenshots
![](./doc/screenshots/armadietto.png)
![](./doc/screenshots/armadietto.png)
## Disclaimers / important information ## Disclaimers / important information
### Important Notes ### :warning: WARNING
RemoteStorage requires a dedicated domain, so obtain one and add it using the YunoHost admin panel. **Domains -> Add domain**. As RemoteStorage uses the full domain and is installed on the root, you can create a subdomain such as remote.domain.tld. Don't forget to update your DNS if you manage them manually. Armadietto_ynh still in develoment:
RemoteStorage requires browser-approved SSL certificates. If you have certificates not issued by [Let's Encrypt](https://letsencrypt.org/), install them manually as usual. * Security considerations from [Armadietto](https://github.com/remotestorage/armadietto/) :
### Application for remoteStorage >### **Storage security**
[Click here](https://remotestorage.io/apps/) to see the list of applications that can be used with RemoteStorage. >
>In production, we recommend that you restrict access to the files managed by your armadietto server as much as possible. This is particularly true if you host your storage on a machine with other web applications; you need to protect your files in the event that one of those apps is exploited.
>
>You should take these steps to keep your storage safe:
>
> - Pick a unique Unix user to run your server process; no other process on the box should run as this user: sudo useradd armadietto --system --no-create-home
>
> - Do not run other applications as root, or as any user that could access files owned by your armadietto user
>
> - Make sure the directory path/to/storage cannot be read, written or executed by anyone but this user: sudo chmod 0700 /path/to/storage && sudo chown armadietto /path/to/storage
>
> - Do not run armadietto as root; if you need to bind to port 80 or 443 use a reverse proxy like nginx, Apache2, caddy, lighttpd or enable bind capability: setcap 'cap_net_bind_service=+ep' `which armadietto`
>
> - Ideally, run your storage inside a container or on a dedicated machine
<br />
### **Important Notes**
- RemoteStorage requires a dedicated domain, so obtain one and add it using the YunoHost admin panel. **Domains -> Add domain**.
- As RemoteStorage uses the full domain and is installed on the root, you can create a subdomain such as remote.domain.tld.
- Don't forget to update your DNS if you manage them manually.
- RemoteStorage requires browser-approved SSL certificates. If you have certificates not issued by [Let's Encrypt](https://letsencrypt.org/), install them manually as usual.
## TODO
* Any known limitations, constraints or non-functioning elements, such as (but not limited to) :
* Unsupported architectures?
* Single sign-on or LDAP integration not working?
* etc...
* Other information that people should know, such as. :
* any specific steps to be performed after installation (like manually terminating the installation, specific admin credentials, ...)
* How to configure / administer the application if it is not obvious.
* Specifics, things to know?
## Documentation and resources ## Documentation and resources
* Official app website: https://remotestorage.io/ * Official app website: https://remotestorage.io/
* Upstream app code repository: https://github.com/remotestorage/armadietto/ * Upstream app code repository: https://github.com/remotestorage/armadietto
* Report a bug: https://github.com/bencharp/armadietto_ynh/issues * YunoHost documentation for this app: https://yunohost.org/app_armadietto
* Report a bug: https://github.com/YunoHost-Apps/armadietto_ynh/issues
## Developer info ## Developer info
Please send your pull request to the [testing branch](https://github.com/bencharp/armadietto_ynh/tree/testing). Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/armadietto_ynh/tree/testing).
To try the testing branch, please proceed like that. To try the testing branch, please proceed like that.
``` ```
sudo yunohost app install https://github.com/bencharp/armadietto_ynh/tree/testing --debug sudo yunohost app install https://github.com/YunoHost-Apps/armadietto_ynh/tree/testing --debug
or or
sudo yunohost app upgrade armadietto_ynh -u https://github.com/bencharp/armadietto_ynh/tree/testing --debug sudo yunohost app upgrade armadietto -u https://github.com/YunoHost-Apps/armadietto_ynh/tree/testing --debug
``` ```
**More info regarding app packaging:** https://yunohost.org/packaging_apps

View file

@ -1,22 +1,22 @@
# Armadietto package pour Yunohost # Armadietto pour YunoHost
[![Integration level](https://dash.yunohost.org/integration/armadietto.svg)](https://dash.yunohost.org/appci/app/armadietto) ![](https://ci-apps.yunohost.org/ci/badges/armadietto.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/armadietto.maintain.svg) [![Niveau d'intégration](https://dash.yunohost.org/integration/armadietto.svg)](https://dash.yunohost.org/appci/app/armadietto) ![](https://ci-apps.yunohost.org/ci/badges/armadietto.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/armadietto.maintain.svg)
[![Installer Armadietto avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=armadietto)
[![Install Armadietto with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=armadietto)
*[Read this readme in english.](./README.md)* *[Read this readme in english.](./README.md)*
*[Lire ce readme en français.](./README_fr.md)*
> *Ce package vous permet d'installer Armadietto 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 paquetage vous permet d'installer Armadietto rapidement et simplement sur un serveur YunoHost. ## Vue d'ensemble
Si vous n'avez pas YunoHost, veuillez consulter [le guide](https://yunohost.org/#/install) pour savoir comment l'installer.*
## Aperçu d'Armadietto
[Armadietto](https://github.com/remotestorage/armadietto/) est un serveur [remoteStorage](https://remotestorage.io) écrit pour Node.js. [Armadietto](https://github.com/remotestorage/armadietto/) est un serveur [remoteStorage](https://remotestorage.io) écrit pour Node.js.
Armadietto est maintenu par l'équipe remoteStorage [IRC](https://kiwiirc.com/client/irc.freenode.net/#remotestorage). Armadietto est maintenu par l'équipe remoteStorage [IRC](https://kiwiirc.com/client/irc.freenode.net/#remotestorage).
> ### :warning : WARNING > ### :warning: WARNING
> Veuillez ne pas considérer `armadietto` comme prêt pour la production, ce projet est toujours > Veuillez ne pas considérer `armadietto` comme prêt pour la production, ce projet est toujours
> comme expérimental. Comme avec toute technologie de stockage en phase alpha, vous > comme expérimental. Comme avec toute technologie de stockage en phase alpha, vous
> devez vous attendre à ce qu'elle mange vos données et prendre des précautions contre cela. Vous > devez vous attendre à ce qu'elle mange vos données et prendre des précautions contre cela. Vous
@ -25,40 +25,81 @@ Armadietto est maintenu par l'équipe remoteStorage [IRC](https://kiwiirc.com/cl
**Version livrée:** 0.1.5 **Version livrée:** 0.1.5
### Application pour remoteStorage
[Cliquez ici](https://remotestorage.io/apps/) pour voir la liste des applications qui peuvent être utilisées avec RemoteStorage.
**Version incluse :** 0.0.2~ynh6
## Captures d'écran ## Captures d'écran
![](./doc/screenshots/armadietto.png)
![](./doc/screenshots/armadietto.png)
## Avertissements / informations importantes ## Avertissements / informations importantes
### Notes importantes ### :warning: WARNING
RemoteStorage nécessite un domaine dédié, il faut donc en obtenir un et l'ajouter en utilisant le panneau d'administration de YunoHost. **Domaines -> Ajouter un domaine**. Comme RemoteStorage utilise le domaine complet et est installé à la racine, vous pouvez créer un sous-domaine tel que remote.domain.tld. N'oubliez pas de mettre à jour vos DNS si vous les gérez manuellement. Armadietto_ynh still in develoment:
RemoteStorage nécessite des certificats SSL approuvés par le navigateur. Si vous disposez de certificats qui ne sont pas émis par [Let's Encrypt](https://letsencrypt.org/), installez-les manuellement comme d'habitude. * l'authentification unique ou l'intégration LDAP ne fonctionne pas ?
* Considérations sur la sécurité de [Armadietto](https://github.com/remotestorage/armadietto/) :
### Application pour remoteStorage > ### **Sécurité du stockage**
[Cliquez ici](https://remotestorage.io/apps/) pour voir la liste des applications qui peuvent être utilisées avec RemoteStorage. >
> En production, nous vous recommandons de restreindre autant que possible l'accès aux fichiers gérés par votre serveur armadietto. Ceci est particulièrement vrai si vous hébergez votre stockage sur une machine avec d'autres applications web ; vous devez protéger vos fichiers dans le cas où l'une de ces applications serait exploitée.
>
> Vous devez prendre les mesures suivantes pour assurer la sécurité de votre stockage :
>
> - Choisissez un utilisateur Unix unique pour exécuter votre processus serveur ; aucun autre processus sur la machine ne doit être exécuté sous cet utilisateur : sudo useradd armadietto --system --no-create-home
>
> - Ne lancez pas d'autres applications en tant que root, ou en tant qu'utilisateur qui pourrait accéder à des fichiers appartenant à votre utilisateur armadietto.
>
> - Assurez-vous que le répertoire path/to/storage ne peut être lu, écrit ou exécuté par personne d'autre que cet utilisateur : sudo chmod 0700 /path/to/storage && sudo chown armadietto /path/to/storage
>
> - Ne lancez pas armadietto en tant que root ; si vous avez besoin de vous lier au port 80 ou 443, utilisez un reverse proxy comme nginx, Apache2, caddy, lighttpd ou activez la capacité de liaison : setcap 'cap_net_bind_service=+ep' `which armadietto`.
>
> - Idéalement, exécutez votre stockage dans un conteneur ou sur une machine dédiée.
<br />
### **Notes importantes**
- RemoteStorage nécessite un domaine dédié, il faut donc en obtenir un et l'ajouter en utilisant le panneau d'administration de YunoHost. **Domaines -> Ajouter un domaine**.
- Comme RemoteStorage utilise le domaine complet et est installé à la racine, vous pouvez créer un sous-domaine tel que remote.domain.tld.
- N'oubliez pas de mettre à jour vos DNS si vous les gérez manuellement.
- RemoteStorage nécessite des certificats SSL approuvés par le navigateur. Si vous disposez de certificats qui ne sont pas émis par [Let's Encrypt](https://letsencrypt.org/), installez-les manuellement comme d'habitude.
## TODO
* Toute limitation ou contrainte connue ou tout élément ne fonctionnant pas, tel que (mais non limité à) :
* architectures non prises en charge ?
* L'authentification unique ou l'intégration LDAP ne fonctionnent pas ?
* etc...
* D'autres informations que les gens devraient connaître, comme.. :
* toute étape spécifique à effectuer après l'installation (comme terminer manuellement l'installation, des identifiants d'administration spécifiques, ...)
* Comment configurer / administrer l'application si ce n'est pas évident.
* Spécificités, les choses à savoir ?
## Documentations et ressources ## Documentations et ressources
* Site Web officiel de l'application : https://remotestorage.io/ * Site officiel de l'app : https://remotestorage.io/
* Dépôt de code de l'application en amont : https://github.com/remotestorage/armadietto/ * Dépôt de code officiel de l'app : https://github.com/remotestorage/armadietto
* Signalez un bogue : https://github.com/bencharp/armadietto_ynh/issues * Documentation YunoHost pour cette app : https://yunohost.org/app_armadietto
* Signaler un bug : https://github.com/YunoHost-Apps/armadietto_ynh/issues
## Informations pour les développeurs ## Informations pour les développeurs
Veuillez envoyer votre demande à la [branche de test] (https://github.com/bencharp/armadietto_ynh/tree/testing). Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/armadietto_ynh/tree/testing).
Pour essayer la branche testing, veuillez procéder comme suit. Pour essayer la branche testing, procédez comme suit.
``` ```
sudo yunohost app install https://github.com/bencharp/armadietto_ynh/tree/testing --debug sudo yunohost app install https://github.com/YunoHost-Apps/armadietto_ynh/tree/testing --debug
ou ou
sudo yunohost app upgrade armadietto_ynh -u https://github.com/bencharp/armadietto_ynh/tree/testing --debug sudo yunohost app upgrade armadietto -u https://github.com/YunoHost-Apps/armadietto_ynh/tree/testing --debug
``` ```
**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps

View file

@ -16,20 +16,20 @@
pkg_linter=1 pkg_linter=1
setup_sub_dir=0 setup_sub_dir=0
setup_root=1 setup_root=1
setup_nourl=1 setup_nourl=0
setup_private=1 setup_private=1
setup_public=1 setup_public=1
upgrade=1 upgrade=1
# 0.0.2-beta.10~ynh1 # 0.0.2~ynh5
upgrade=1 from_commit=27894600799b8b04f71e7ec219798e34512e51b0 upgrade=1 from_commit=d185b84698a9f7e83eff6bf6dd5606f35282a536
backup_restore=1 backup_restore=1
multi_instance=0 multi_instance=0
port_already_use=1 port_already_use=0
change_url=1 change_url=1
;;; Options ;;; Options
Email= Email=
Notification=none Notification=none
;;; Upgrade options ;;; Upgrade options
; commit=27894600799b8b04f71e7ec219798e34512e51b0 ; commit=d185b84698a9f7e83eff6bf6dd5606f35282a536
name= Upgrade to version 0.0.2-beta.10~ynh1 name= Upgrade to version 0.0.2~ynh6
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&is_signup=true&port=8008& manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&is_signup=true&port=8008&

View file

@ -7,4 +7,5 @@ final_path: __FINALPATH__
datadir: __DATADIR__ datadir: __DATADIR__
port: __PORT__ port: __PORT__
domain: __DOMAIN__ domain: __DOMAIN__
is_signup: __IS_SIGNUP__

View file

@ -15,6 +15,5 @@ location __PATH__ {
# Include SSOWAT user panel. # Include SSOWAT user panel.
# include conf.d/yunohost_panel.conf.inc; # include conf.d/yunohost_panel.conf.inc;
} }

View file

@ -19,7 +19,7 @@ server = new Armadietto({
key: '/etc/yunohost/certs/__DOMAIN__/key.pem' key: '/etc/yunohost/certs/__DOMAIN__/key.pem'
}, },
allow: { allow: {
signup: __SIGNUP__ signup: __IS_SIGNUP__
}, },
cacheViews: false cacheViews: false
}); });

View file

@ -1,5 +1,5 @@
[Unit] [Unit]
Description=Armadietto is a remoteStorage server written in nodejs Description=Armadietto, a remoteStorage server service
After=network.target After=network.target
[Service] [Service]

View file

@ -1,6 +1,20 @@
## TODO
Une description longue de ce que fait l'application [Armadietto](https://github.com/remotestorage/armadietto/) is a [remoteStorage](https://remotestorage.io) server written for Node.js.
Armadietto is maintained by remoteStorage Team [IRC](https://kiwiirc.com/client/irc.freenode.net/#remotestorage)
> ### :warning: WARNING
> Please do not consider `armadietto` production ready, this project is still
> considered experimental. As with any alpha-stage storage technology, you
> MUST expect that it will eat your data and take precautions against this. You
> SHOULD expect that its APIs and storage schemas will change before it is
> labelled stable.
**Shipped version:** 0.1.5
### Application for remoteStorage
[Click here](https://remotestorage.io/apps/) to see the list of applications that can be used with RemoteStorage.
### Features ### Features

17
doc/DESCRIPTION_fr.md Normal file
View file

@ -0,0 +1,17 @@
[Armadietto](https://github.com/remotestorage/armadietto/) est un serveur [remoteStorage](https://remotestorage.io) écrit pour Node.js.
Armadietto est maintenu par l'équipe remoteStorage [IRC](https://kiwiirc.com/client/irc.freenode.net/#remotestorage).
> ### :warning: WARNING
> Veuillez ne pas considérer `armadietto` comme prêt pour la production, ce projet est toujours
> comme expérimental. Comme avec toute technologie de stockage en phase alpha, vous
> devez vous attendre à ce qu'elle mange vos données et prendre des précautions contre cela. Vous
> Vous devez vous attendre à ce que ses API et ses schémas de stockage changent avant qu'il ne soit
> étiqueté comme stable.
**Version livrée:** 0.1.5
### Application pour remoteStorage
[Cliquez ici](https://remotestorage.io/apps/) pour voir la liste des applications qui peuvent être utilisées avec RemoteStorage.

View file

@ -1,16 +1,43 @@
### :warning: WARNING
Armadietto_ynh still in develoment:
* Security considerations from [Armadietto](https://github.com/remotestorage/armadietto/) :
>### **Storage security**
>
>In production, we recommend that you restrict access to the files managed by your armadietto server as much as possible. This is particularly true if you host your storage on a machine with other web applications; you need to protect your files in the event that one of those apps is exploited.
>
>You should take these steps to keep your storage safe:
>
> - Pick a unique Unix user to run your server process; no other process on the box should run as this user: sudo useradd armadietto --system --no-create-home
>
> - Do not run other applications as root, or as any user that could access files owned by your armadietto user
>
> - Make sure the directory path/to/storage cannot be read, written or executed by anyone but this user: sudo chmod 0700 /path/to/storage && sudo chown armadietto /path/to/storage
>
> - Do not run armadietto as root; if you need to bind to port 80 or 443 use a reverse proxy like nginx, Apache2, caddy, lighttpd or enable bind capability: setcap 'cap_net_bind_service=+ep' `which armadietto`
>
> - Ideally, run your storage inside a container or on a dedicated machine
<br />
### **Important Notes**
- RemoteStorage requires a dedicated domain, so obtain one and add it using the YunoHost admin panel. **Domains -> Add domain**.
- As RemoteStorage uses the full domain and is installed on the root, you can create a subdomain such as remote.domain.tld.
- Don't forget to update your DNS if you manage them manually.
- RemoteStorage requires browser-approved SSL certificates. If you have certificates not issued by [Let's Encrypt](https://letsencrypt.org/), install them manually as usual.
## TODO ## TODO
* Toute limitation ou contrainte connue ou tout élément ne fonctionnant pas, tel que (mais non limité à) : * Any known limitations, constraints or non-functioning elements, such as (but not limited to) :
* nécessitant un domaine dédié complet ? * Unsupported architectures?
* architectures non prises en charge ? * Single sign-on or LDAP integration not working?
* L'authentification unique ou l'intégration LDAP ne fonctionnent pas ?
* l'application nécessite une quantité importante de RAM / disque / ... pour s'installer ou fonctionner correctement.
* etc... * etc...
* D'autres informations que les gens devraient connaître, comme.. : * Other information that people should know, such as. :
* toute étape spécifique à effectuer après l'installation (comme terminer manuellement l'installation, des identifiants d'administration spécifiques, ...) * any specific steps to be performed after installation (like manually terminating the installation, specific admin credentials, ...)
* Comment configurer / administrer l'application si ce n'est pas évident. * How to configure / administer the application if it is not obvious.
* le processus de mise à niveau, les spécificités, les choses à savoir ? * Specifics, things to know?
* Considérations de sécurité
Traduit avec www.DeepL.com/Translator (version gratuite)

45
doc/DISCLAIMER_fr.md Normal file
View file

@ -0,0 +1,45 @@
### :warning: WARNING
Armadietto_ynh still in develoment:
* l'authentification unique ou l'intégration LDAP ne fonctionne pas ?
* Considérations sur la sécurité de [Armadietto](https://github.com/remotestorage/armadietto/) :
> ### **Sécurité du stockage**
>
> En production, nous vous recommandons de restreindre autant que possible l'accès aux fichiers gérés par votre serveur armadietto. Ceci est particulièrement vrai si vous hébergez votre stockage sur une machine avec d'autres applications web ; vous devez protéger vos fichiers dans le cas où l'une de ces applications serait exploitée.
>
> Vous devez prendre les mesures suivantes pour assurer la sécurité de votre stockage :
>
> - Choisissez un utilisateur Unix unique pour exécuter votre processus serveur ; aucun autre processus sur la machine ne doit être exécuté sous cet utilisateur : sudo useradd armadietto --system --no-create-home
>
> - Ne lancez pas d'autres applications en tant que root, ou en tant qu'utilisateur qui pourrait accéder à des fichiers appartenant à votre utilisateur armadietto.
>
> - Assurez-vous que le répertoire path/to/storage ne peut être lu, écrit ou exécuté par personne d'autre que cet utilisateur : sudo chmod 0700 /path/to/storage && sudo chown armadietto /path/to/storage
>
> - Ne lancez pas armadietto en tant que root ; si vous avez besoin de vous lier au port 80 ou 443, utilisez un reverse proxy comme nginx, Apache2, caddy, lighttpd ou activez la capacité de liaison : setcap 'cap_net_bind_service=+ep' `which armadietto`.
>
> - Idéalement, exécutez votre stockage dans un conteneur ou sur une machine dédiée.
<br />
### **Notes importantes**
- RemoteStorage nécessite un domaine dédié, il faut donc en obtenir un et l'ajouter en utilisant le panneau d'administration de YunoHost. **Domaines -> Ajouter un domaine**.
- Comme RemoteStorage utilise le domaine complet et est installé à la racine, vous pouvez créer un sous-domaine tel que remote.domain.tld.
- N'oubliez pas de mettre à jour vos DNS si vous les gérez manuellement.
- RemoteStorage nécessite des certificats SSL approuvés par le navigateur. Si vous disposez de certificats qui ne sont pas émis par [Let's Encrypt](https://letsencrypt.org/), installez-les manuellement comme d'habitude.
## TODO
* Toute limitation ou contrainte connue ou tout élément ne fonctionnant pas, tel que (mais non limité à) :
* architectures non prises en charge ?
* L'authentification unique ou l'intégration LDAP ne fonctionnent pas ?
* etc...
* D'autres informations que les gens devraient connaître, comme.. :
* toute étape spécifique à effectuer après l'installation (comme terminer manuellement l'installation, des identifiants d'administration spécifiques, ...)
* Comment configurer / administrer l'application si ce n'est pas évident.
* Spécificités, les choses à savoir ?

View file

@ -3,10 +3,10 @@
"id": "armadietto", "id": "armadietto",
"packaging_format": 1, "packaging_format": 1,
"description": { "description": {
"en": "Armadietto is a remoteStorage server written for Node.js.", "en": "A remoteStorage server written for Node.js.",
"fr": "Armadietto est un serveur remoteStorage écrit pour node.js." "fr": "Un serveur remoteStorage écrit pour node.js."
}, },
"version": "0.0.2-beta.10~ynh2", "version": "0.0.2~ynh6",
"url": "https://github.com/remotestorage/armadietto", "url": "https://github.com/remotestorage/armadietto",
"upstream": { "upstream": {
"license": "MIT", "license": "MIT",

View file

@ -49,6 +49,7 @@ ynh_backup --src_path="$final_path"
ynh_backup --src_path="$datadir" ynh_backup --src_path="$datadir"
#=================================================
# BACKUP THE ARMADIETTO SERVER # BACKUP THE ARMADIETTO SERVER
#================================================= #=================================================

View file

@ -24,7 +24,7 @@ app=$YNH_APP_INSTANCE_NAME
#================================================= #=================================================
# LOAD SETTINGS # LOAD SETTINGS
#================================================= #=================================================
ynh_script_progression --message="Loading installation settings..." --weight=1 ynh_script_progression --message="Loading installation settings..." --weight=2
# Needed for helper "ynh_add_nginx_config" # Needed for helper "ynh_add_nginx_config"
final_path=$(ynh_app_setting_get --app=$app --key=final_path) final_path=$(ynh_app_setting_get --app=$app --key=final_path)
@ -37,7 +37,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
#================================================= #=================================================
# BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP # BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP
#================================================= #=================================================
ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=1 ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=3
# Backup the current version of the app # Backup the current version of the app
ynh_backup_before_upgrade ynh_backup_before_upgrade
@ -72,7 +72,7 @@ fi
#================================================= #=================================================
# STOP SYSTEMD SERVICE # STOP SYSTEMD SERVICE
#================================================= #=================================================
ynh_script_progression --message="Stopping a systemd service..." --weight=1 ynh_script_progression --message="Stopping a systemd service..." --weight=2
ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log"
@ -138,5 +138,4 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$ap
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================
ynh_script_progression --message="Change of URL completed for $app" --last ynh_script_progression --message="Change of URL completed for $app" --last

View file

@ -37,11 +37,10 @@ datadir="/home/yunohost.app/${app}/storage"
#================================================= #=================================================
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
#================================================= #=================================================
ynh_script_progression --message="Validating installation parameters..." --weight=1 ynh_script_progression --message="Validating installation parameters..." --weight=2
### If the app uses NGINX as web server (written in HTML/PHP in most cases), the final path should be "/var/www/$app".
### If the app provides an internal web server (or uses another application server such as uWSGI), the final path should be "/opt/yunohost/$app"
final_path=/opt/yunohost/$app final_path=/opt/yunohost/$app
test ! -e "$final_path" || ynh_die --message="This path already contains a folder" test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
# Only on / directory # Only on / directory
@ -68,24 +67,16 @@ ynh_app_setting_set --app=$app --key=datadir --value=$datadir
#================================================= #=================================================
# FIND AND OPEN A PORT # FIND AND OPEN A PORT
#================================================= #=================================================
ynh_script_progression --message="Finding an available port..." --weight=1 ynh_script_progression --message="Finding an available port..." --weight=2
# Find an available port # Find an available port
port=$(ynh_find_port --port=8008) port=$(ynh_find_port --port=8008)
ynh_app_setting_set --app=$app --key=port --value=$port ynh_app_setting_set --app=$app --key=port --value=$port
# Optional: Expose this port publicly
# (N.B.: you only need to do this if the app actually needs to expose the port publicly.
# If you do this and the app doesn't actually need you are CREATING SECURITY HOLES IN THE SERVER !)
# Open the port
# ynh_script_progression --message="Configuring firewall..." --weight=1
# ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $port
#================================================= #=================================================
# INSTALL DEPENDENCIES # INSTALL DEPENDENCIES
#================================================= #=================================================
ynh_script_progression --message="Installing dependencies..." --weight=4 ynh_script_progression --message="Installing dependencies..." --weight=23
ynh_install_nodejs --nodejs_version=$NODEJS_VERSION ynh_install_nodejs --nodejs_version=$NODEJS_VERSION
ynh_use_nodejs ynh_use_nodejs
@ -96,8 +87,6 @@ ynh_use_nodejs
ynh_script_progression --message="Setting up and create final app path..." --weight=1 ynh_script_progression --message="Setting up and create final app path..." --weight=1
ynh_app_setting_set $app final_path $final_path ynh_app_setting_set $app final_path $final_path
# Download, check integrity, uncompress and patch the source from app.src
# ynh_setup_source --dest_dir="$final_path"
# Create final_path # Create final_path
mkdir -p "$final_path" mkdir -p "$final_path"
@ -105,9 +94,7 @@ mkdir -p "$final_path"
#================================================= #=================================================
# NGINX CONFIGURATION # NGINX CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Configuring NGINX web server..." --weight=1 ynh_script_progression --message="Configuring NGINX web server..." --weight=2
### `ynh_add_nginx_config` will use the file conf/nginx.conf
# Create a dedicated NGINX config # Create a dedicated NGINX config
ynh_add_nginx_config ynh_add_nginx_config
@ -115,15 +102,15 @@ ynh_add_nginx_config
#================================================= #=================================================
# CREATE DEDICATED USER # CREATE DEDICATED USER
#================================================= #=================================================
ynh_script_progression --message="Configuring system user..." --weight=1 ynh_script_progression --message="Configuring system user..." --weight=2
# Create a system user # Create a system user
ynh_system_user_create --username=$app --home_dir="$final_path" ynh_system_user_create --username=$app
#================================================= #=================================================
# ADD A CONFIGURATION # ADD A CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Adding a configuration file..." ynh_script_progression --message="Adding a configuration file..." --weight=1
ynh_add_config --template="../conf/config.sample.yml" --destination="$final_path/config.yml" ynh_add_config --template="../conf/config.sample.yml" --destination="$final_path/config.yml"
@ -133,30 +120,33 @@ chown $app:$app "$final_path/config.yml"
#================================================= #=================================================
# SETUP SYSTEMD # SETUP SYSTEMD
#================================================= #=================================================
ynh_script_progression --message="Configuring a systemd service..." --weight=1 ynh_script_progression --message="Configuring a systemd service..." --weight=3
# Create a dedicated systemd config # Create a dedicated systemd config
ynh_add_systemd_config ynh_add_systemd_config
#================================================= #=================================================
# SETUP ARMADIETTO AS A SERVICE # CREATE DATA DIRECTORY
#================================================= #=================================================
ynh_script_progression --message="Configuring armadietto as a service..." --weight=1 ynh_script_progression --message="Creating a data directory..." --weight=1
# Define armadietto module path ynh_app_setting_set --app=$app --key=datadir --value=$datadir
modulepath="$node_version_path/$nodejs_version/lib/node_modules/armadietto/lib"
# Create app data folder # Create app data folder
mkdir -p "$datadir" mkdir -p $datadir
# Using Armadietto as a service in a basic node server #=================================================
cp -f ../conf/server.js "$final_path/server.js" # SETUP ARMADIETTO AS A SERVICE
#=================================================
ynh_script_progression --message="Configuring armadietto as a service..." --weight=2
ynh_replace_string --match_string="__MODULE_PATH__" --replace_string="$modulepath" --target_file="$final_path/server.js" # Define armadietto module path
ynh_replace_string --match_string="__DATADIR__" --replace_string="$datadir" --target_file="$final_path/server.js" module_path="$node_version_path/$nodejs_version/lib/node_modules/armadietto/lib"
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$final_path/server.js"
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$final_path/server.js" ynh_add_config --template="../conf/server.js" --destination="$final_path/server.js"
ynh_replace_string --match_string="__SIGNUP__" --replace_string="$is_signup" --target_file="$final_path/server.js"
chmod 400 "$final_path/server.js"
chown $app:$app "$final_path/server.js"
#================================================= #=================================================
# INSTALL ARMADIETTO # INSTALL ARMADIETTO
@ -167,8 +157,6 @@ pushd $final_path
ynh_npm -g i armadietto ynh_npm -g i armadietto
popd popd
ynh_script_progression --message="Armadietto installed..."
#================================================= #=================================================
# GENERIC FINALIZATION # GENERIC FINALIZATION
#================================================= #=================================================
@ -186,19 +174,20 @@ ynh_script_progression --message="Secure files and directories" --weight=1
# Set permissions to app files # Set permissions to app files
chown -R $app:$app "$final_path" chown -R $app:$app "$final_path"
chmod 0700 $datadir && chown $app:$app $datadir chmod 0700 "$datadir"
chown $app:$app "$datadir"
#================================================= #=================================================
# INTEGRATE SERVICE IN YUNOHOST # INTEGRATE SERVICE IN YUNOHOST
#================================================= #=================================================
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
yunohost service add $app --description="A short description of the app" --log="/var/log/$app/$app.log" yunohost service add $app --description="Armadietto run a remotestorage server as service" --log="/var/log/$app/$app.log"
#================================================= #=================================================
# SETUP SSOWAT # SETUP SSOWAT
#================================================= #=================================================
ynh_script_progression --message="Configuring permissions..." --weight=1 ynh_script_progression --message="Configuring permissions..." --weight=2
# Make app public if necessary # Make app public if necessary
if [ $is_public -eq 1 ] if [ $is_public -eq 1 ]

View file

@ -12,7 +12,7 @@ source /usr/share/yunohost/helpers
#================================================= #=================================================
# LOAD SETTINGS # LOAD SETTINGS
#================================================= #=================================================
ynh_script_progression --message="Loading installation settings..." --weight=1 ynh_script_progression --message="Loading installation settings..." --weight=2
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
@ -37,7 +37,7 @@ fi
#================================================= #=================================================
# STOP AND REMOVE SERVICE # STOP AND REMOVE SERVICE
#================================================= #=================================================
ynh_script_progression --message="Stopping and removing the systemd service..." --weight=1 ynh_script_progression --message="Stopping and removing the systemd service..." --weight=2
# Remove the dedicated systemd config # Remove the dedicated systemd config
ynh_remove_systemd_config ynh_remove_systemd_config
@ -45,7 +45,7 @@ ynh_remove_systemd_config
#================================================= #=================================================
# REMOVE LOGROTATE CONFIGURATION # REMOVE LOGROTATE CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Removing logrotate configuration..." --time --weight=1 ynh_script_progression --message="Removing logrotate configuration..." --weight=1
# Remove the app-specific logrotate config # Remove the app-specific logrotate config
ynh_remove_logrotate ynh_remove_logrotate
@ -53,7 +53,7 @@ ynh_remove_logrotate
#================================================= #=================================================
# REMOVE APP MAIN DIR # REMOVE APP MAIN DIR
#================================================= #=================================================
ynh_script_progression --message="Removing app main directory..." --weight=1 ynh_script_progression --message="Removing app main directory..." --weight=2
# Remove the app directory securely # Remove the app directory securely
ynh_secure_remove --file="$final_path" ynh_secure_remove --file="$final_path"
@ -81,7 +81,7 @@ ynh_remove_nginx_config
#================================================= #=================================================
# REMOVE DEPENDENCIES # REMOVE DEPENDENCIES
#================================================= #=================================================
ynh_script_progression --message="Removing dependencies..." --weight=1 ynh_script_progression --message="Removing dependencies..." --weight=2
ynh_remove_nodejs --nodejs_version=$NODEJS_VERSION ynh_remove_nodejs --nodejs_version=$NODEJS_VERSION

View file

@ -24,7 +24,7 @@ ynh_abort_if_errors
#================================================= #=================================================
# LOAD SETTINGS # LOAD SETTINGS
#================================================= #=================================================
ynh_script_progression --message="Loading installation settings..." --weight=1 ynh_script_progression --message="Loading installation settings..." --weight=2
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
@ -38,13 +38,12 @@ datadir=$(ynh_app_setting_get --app=$app --key=datadir)
#================================================= #=================================================
ynh_script_progression --message="Validating restoration parameters..." --weight=1 ynh_script_progression --message="Validating restoration parameters..." --weight=1
test ! -d $final_path \ test ! -d "$final_path" || ynh_die --message="There is already a directory: $final_path "
|| ynh_die --message="There is already a directory: $final_path "
#================================================= #=================================================
# REINSTALL DEPENDENCIES # REINSTALL DEPENDENCIES
#================================================= #=================================================
ynh_script_progression --message="Reinstalling dependencies..." --weight=4 ynh_script_progression --message="Reinstalling dependencies..." --weight=21
ynh_install_nodejs --nodejs_version=$NODEJS_VERSION ynh_install_nodejs --nodejs_version=$NODEJS_VERSION
ynh_use_nodejs ynh_use_nodejs
@ -64,7 +63,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_script_progression --message="Recreating the dedicated system user..." --weight=1 ynh_script_progression --message="Recreating the dedicated system user..." --weight=1
# Create the dedicated user (if not existing) # Create the dedicated user (if not existing)
ynh_system_user_create --username=$app --home_dir="$final_path" ynh_system_user_create --username=$app
#================================================= #=================================================
# RESTORE THE APP MAIN DIR # RESTORE THE APP MAIN DIR
@ -76,7 +75,7 @@ ynh_restore_file --origin_path="$final_path"
#================================================= #=================================================
# RESTORE SYSTEMD # RESTORE SYSTEMD
#================================================= #=================================================
ynh_script_progression --message="Restoring the systemd configuration..." --weight=1 ynh_script_progression --message="Restoring the systemd configuration..." --weight=2
ynh_restore_file --origin_path="/etc/systemd/system/$app.service" ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
systemctl enable $app.service --quiet systemctl enable $app.service --quiet
@ -98,8 +97,6 @@ pushd $final_path
ynh_npm -g i armadietto ynh_npm -g i armadietto
popd popd
ynh_script_progression --message="Armadietto reinstalled..."
#================================================= #=================================================
# GENERIC FINALIZATION # GENERIC FINALIZATION
#================================================= #=================================================
@ -122,9 +119,9 @@ chmod 0700 $datadir && chown $app:$app $datadir
#================================================= #=================================================
# INTEGRATE SERVICE IN YUNOHOST # INTEGRATE SERVICE IN YUNOHOST
#================================================= #=================================================
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 ynh_script_progression --message="Integrating service in YunoHost..." --weight=2
yunohost service add $app --description="A short description of the app" --log="/var/log/$app/$app.log" yunohost service add $app --description="Armadietto run a remotestorage server as service" --log="/var/log/$app/$app.log"
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX

View file

@ -20,11 +20,14 @@ domain=$(ynh_app_setting_get --app=$app --key=domain)
port=$(ynh_app_setting_get --app=$app --key=port) port=$(ynh_app_setting_get --app=$app --key=port)
final_path=$(ynh_app_setting_get --app=$app --key=final_path) final_path=$(ynh_app_setting_get --app=$app --key=final_path)
datadir=$(ynh_app_setting_get --app=$app --key=datadir) datadir=$(ynh_app_setting_get --app=$app --key=datadir)
is_signup=$(ynh_app_setting_get --app=$app --key=signup) is_signup=$(ynh_app_setting_get --app=$app --key=is_signup)
#================================================= #=================================================
# CHECK VERSION # CHECK VERSION
#================================================= #=================================================
ynh_script_progression --message="Checking version..." --weight=1
upgrade_type=$(ynh_check_app_version_changed)
### This helper will compare the version of the currently installed app and the version of the upstream package. ### This helper will compare the version of the currently installed app and the version of the upstream package.
### $upgrade_type can have 2 different values ### $upgrade_type can have 2 different values
@ -32,12 +35,11 @@ is_signup=$(ynh_app_setting_get --app=$app --key=signup)
### - UPGRADE_PACKAGE if only the YunoHost package has changed ### - UPGRADE_PACKAGE if only the YunoHost package has changed
### ynh_check_app_version_changed will stop the upgrade if the app is up to date. ### ynh_check_app_version_changed will stop the upgrade if the app is up to date.
### UPGRADE_APP should be used to upgrade the core app only if there's an upgrade to do. ### UPGRADE_APP should be used to upgrade the core app only if there's an upgrade to do.
upgrade_type=$(ynh_check_app_version_changed)
#================================================= #=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#================================================= #=================================================
ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=1 ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=4
# Backup the current version of the app # Backup the current version of the app
ynh_backup_before_upgrade ynh_backup_before_upgrade
@ -62,18 +64,22 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app
#================================================= #=================================================
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
# Cleaning legacy permissions
if ynh_legacy_permissions_exists; then
ynh_legacy_permissions_delete_all
ynh_app_setting_delete --app=$app --key=is_public
fi
# Remove old log file
ynh_secure_remove --file="/var/log/$app/"
# #
# N.B. : the followings setting migrations snippets are provided as *EXAMPLES* # N.B. : the followings setting migrations snippets are provided as *EXAMPLES*
# of what you may want to do in some cases (e.g. a setting was not defined on # of what you may want to do in some cases (e.g. a setting was not defined on
# some legacy installs and you therefore want to initiaze stuff during upgrade) # some legacy installs and you therefore want to initiaze stuff during upgrade)
# #
# If db_name doesn't exist, create it
#if [ -z "$db_name" ]; then
# db_name=$(ynh_sanitize_dbid --db_name=$app)
# ynh_app_setting_set --app=$app --key=db_name --value=$db_name
#fi
# If final_path doesn't exist, create it # If final_path doesn't exist, create it
#if [ -z "$final_path" ]; then #if [ -z "$final_path" ]; then
# final_path=/var/www/$app # final_path=/var/www/$app
@ -86,7 +92,7 @@ ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1 ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1
# Create a dedicated user (if not existing) # Create a dedicated user (if not existing)
ynh_system_user_create --username=$app --home_dir="$final_path" ynh_system_user_create --username=$app
#================================================= #=================================================
# CHECK AND CREATE FINAL_PATH # CHECK AND CREATE FINAL_PATH
@ -113,32 +119,37 @@ ynh_use_nodejs
#================================================= #=================================================
# ADD A CONFIGURATION # ADD A CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Adding a configuration file..." ynh_script_progression --message="Adding a configuration file..." --weight=2
ynh_add_config --template="../conf/config.sample.yml" --destination="$final_path/config.yml" ynh_add_config --template="../conf/config.sample.yml" --destination="$final_path/config.yml"
chmod 400 "$final_path/config.yml" chmod 400 "$final_path/config.yml"
chown $app:$app "$final_path/config.yml" chown $app:$app "$final_path/config.yml"
#=================================================
# CREATE DATA DIRECTORY
#=================================================
if [ -z "$datadir" ]; then
ynh_script_progression --message="Creating a data directory..." --weight=1
ynh_app_setting_set --app=$app --key=datadir --value=$datadir
# Create app data folder
mkdir -p $datadir
fi
#================================================= #=================================================
# DEFINE ARMADIETTO OPTIONS & CREATE DATA DIRECTORY # DEFINE ARMADIETTO OPTIONS & CREATE DATA DIRECTORY
#================================================= #=================================================
ynh_script_progression --message="Configuring armadietto as a service..." --weight=1 ynh_script_progression --message="Configuring armadietto as a service..." --weight=2
# Define armadietto module path # Define armadietto module path
modulepath="$node_version_path/$nodejs_version/lib/node_modules/armadietto/lib" module_path="$node_version_path/$nodejs_version/lib/node_modules/armadietto/lib"
# Create app data folder ynh_add_config --template="../conf/server.js" --destination="$final_path/server.js"
mkdir -p "$datadir"
# Using Armadietto as a service in a basic node server chmod 400 "$final_path/server.js"
cp -f ../conf/server.js "$final_path/server.js" chown $app:$app "$final_path/server.js"
ynh_replace_string --match_string="__MODULE_PATH__" --replace_string="$modulepath" --target_file="$final_path/server.js"
ynh_replace_string --match_string="__DATADIR__" --replace_string="$datadir" --target_file="$final_path/server.js"
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$final_path/server.js"
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$final_path/server.js"
ynh_replace_string --match_string="__SIGNUP__" --replace_string="$is_signup" --target_file="$final_path/server.js"
#================================================= #=================================================
# UPGRADE ARMADIETTO # UPGRADE ARMADIETTO
@ -150,14 +161,17 @@ then
pushd $final_path pushd $final_path
ynh_npm -g i armadietto ynh_npm -g i armadietto
popd popd
ynh_script_progression --message="Armadietto upgraded..."
fi fi
#================================================= #=================================================
# UPDATE A CONFIG FILE # UPDATE A CONFIG FILE
#================================================= #=================================================
ynh_script_progression --message="Updating a configuration file..." --weight=1 ynh_script_progression --message="Updating a configuration file..." --weight=2
ynh_add_config --template="../conf/config.sample.yml" --destination="$final_path/config.yml"
chmod 400 "$final_path/config.yml"
chown $app:$app "$final_path/config.yml"
### Same as during install ### Same as during install
### ###
@ -182,7 +196,7 @@ ynh_script_progression --message="Updating a configuration file..." --weight=1
#================================================= #=================================================
# SETUP SYSTEMD # SETUP SYSTEMD
#================================================= #=================================================
ynh_script_progression --message="Upgrading systemd configuration..." --weight=1 ynh_script_progression --message="Upgrading systemd configuration..." --weight=3
# Create a dedicated systemd config # Create a dedicated systemd config
ynh_add_systemd_config ynh_add_systemd_config
@ -192,7 +206,7 @@ ynh_add_systemd_config
#================================================= #=================================================
# SETUP LOGROTATE # SETUP LOGROTATE
#================================================= #=================================================
ynh_script_progression --message="Configuring log rotation..." --weight=1 ynh_script_progression --message="Configuring log rotation..." --weight=2
# Use logrotate to manage application logfile(s) # Use logrotate to manage application logfile(s)
ynh_use_logrotate ynh_use_logrotate
@ -211,19 +225,12 @@ chmod 0700 $datadir && chown $app:$app $datadir
#================================================= #=================================================
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
yunohost service add $app --description="A short description of the app" --log="/var/log/$app/$app.log" yunohost service add $app --description="Armadietto run a remotestorage server as service" --log="/var/log/$app/$app.log"
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=1
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX
#================================================= #=================================================
ynh_script_progression --message="Reloading NGINX web server..." --weight=1 ynh_script_progression --message="Reloading NGINX web server..." --weight=2
ynh_systemd_action --service_name=nginx --action=reload ynh_systemd_action --service_name=nginx --action=reload
@ -238,5 +245,4 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$ap
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================
ynh_script_progression --message="Upgrade of $app completed" --last ynh_script_progression --message="Upgrade of $app completed" --last