1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/onlyoffice_ynh.git synced 2024-09-03 19:56:11 +02:00

Merge pull request #58 from YunoHost-Apps/testing

Testing
This commit is contained in:
Éric Gaspar 2021-06-19 22:55:39 +02:00 committed by GitHub
commit be360fde03
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 237 additions and 202 deletions

View file

@ -1,6 +1,6 @@
---
name: Bug report
about: Create a report to help us debug, it would be nice to fill the template as much as you can to help us, help you and help us all.
about: When creating a bug report, please use the following template to provide all the relevant information and help debugging efficiently.
---
@ -8,28 +8,30 @@ about: Create a report to help us debug, it would be nice to fill the template a
1. *Read this whole template first.*
2. *Determine if you are on the right place:*
- *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change_url...), you are on the right place!*
- *Otherwise, the issue may be due to OnlyOffice itself. Refer to its documentation or repository for help.*
- *If you have a doubt, post here, we will figure it out together.*
- *Otherwise, the issue may be due to the app itself. Refer to its documentation or repository for help.*
- *When in doubt, post here and we will figure it out together.*
3. *Delete the italic comments as you write over them below, and remove this guide.*
---
**Describe the bug**
### Describe the bug
*A clear and concise description of what the bug is.*
**Versions**
### Context
- Hardware: *VPS bought online / Old laptop or computer / Raspberry Pi at home / Internet Cube with VPN / Other ARM board / ...*
- YunoHost version: x.x.x
- I have access to my server: *Through SSH | through the webadmin | direct access via keyboard / screen | ...*
- Are you in a special context or did you perform some particular tweaking on your YunoHost instance ?: *no / yes*
- Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: *no / yes*
- If yes, please explain:
- Using, or trying to install package version/branch:
- If upgrading, current package version: *can be found in the admin, or with `yunohost app info onlyoffice`*
- If upgrading, current package version: *can be found in the admin, or with `yunohost app info $app_id`*
### Steps to reproduce
**To Reproduce**
*Steps to reproduce the behavior.*
- *If you performed a command from the CLI, the command itself is enough. For example:*
```sh
sudo yunohost app install onlyoffice
sudo yunohost app install the_app
```
- *If you used the webadmin, please perform the equivalent command from the CLI first.*
- *If the error occurs in your browser, explain what you did:*
@ -38,9 +40,16 @@ about: Create a report to help us debug, it would be nice to fill the template a
3. *Scroll down to '...'*
4. *See error*
**Expected behavior**
### Expected behavior
*A clear and concise description of what you expected to happen. You can remove this section if the command above is enough to understand your intent.*
**Logs**
*After a failed command, YunoHost makes the log available to you, but also to others, thanks to `yunohost log display [log name] --share`. The actual command, with the correct log name, is displayed at the end of the failed attempt in the CLI. Execute it and copy here the share link it outputs.*
### Logs
*When an operation fails, YunoHost provides a simple way to share the logs.*
- *In the webadmin, the error message contains a link to the relevant log page. On that page, you will be able to 'Share with Yunopaste'. If you missed it, the logs of previous operations are also available under Tools > Logs.*
- *In command line, the command to share the logs is displayed at the end of the operation and looks like `yunohost log display [log name] --share`. If you missed it, you can find the log ID of a previous operation using `yunohost log list`.*
*After sharing the log, please copypaste directly the link provided by YunoHost (to help readability, no need to copypaste the entire content of the log here, just the link is enough...)*
*If applicable and useful, add screenshots to help explain your problem.*

16
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View file

@ -0,0 +1,16 @@
## Problem
- *Description of why you made this PR*
## Solution
- *And how do you fix that problem*
## PR Status
- [ ] Code finished and ready to be reviewed/tested
- [ ] The fix/enhancement were manually tested (if applicable)
## Automatic tests
Automatic tests can be triggered on https://ci-apps-dev.yunohost.org/ *after creating the PR*, by commenting "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!". (N.B. : for this to work you need to be a member of the Yunohost-Apps organization)

View file

@ -1,33 +1,32 @@
# OnlyOffice Server for YunoHost
<!--
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.
-->
# OnlyOffice for YunoHost
[![Integration level](https://dash.yunohost.org/integration/onlyoffice.svg)](https://dash.yunohost.org/appci/app/onlyoffice) ![](https://ci-apps.yunohost.org/ci/badges/onlyoffice.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/onlyoffice.maintain.svg)
[![Install OnlyOffice with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=onlyoffice)
*[Lire ce readme en français.](./README_fr.md)*
> *This package allows you to install OnlyOffice quickly and simply on a YunoHost server.
> *This package allows you to install OnlyOffice 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
OnlyOffice Document Server is an online office suite comprising viewers and editors for texts, spreadsheets and presentations, fully compatible with Office Open XML formats: .docx, .xlsx, .pptx and enabling collaborative editing in real time.
Create and edit documents collaboratively
Online collaborative edition of OnlyOffice documents requires:
1. a server part, with two installation options:
1. OnlyOffice Document Server packaged for YunoHost.
2. The [Community Document Server for Nextcloud](https://apps.nextcloud.com/apps/documentserver_community)
**Shipped version:** 6.1.0~ynh2
2. a client part, such as:
1. The [ONLYOFFICE connector for Nextcloud](https://apps.nextcloud.com/apps/onlyoffice)
2. The [ONLYOFFICE Desktop Editors](https://www.onlyoffice.com/fr/download-desktop.aspx)
The Nextcloud addicts may follow [this tutorial](https://github.com/YunoHost-Apps/nextcloud_ynh#configure-onlyoffice-integration) to install (1.ii) and (2.i) on one Nextcloud instance. However, performance and architecture are limited.
**Shipped version:** 6.1.0
**Demo:** https://www.onlyoffice.com/fr/download-desktop.aspx
## Screenshots
![](https://static-www.onlyoffice.com/v9.5.0/images/mainpage/may2018/editors/document-short.jpg)
![](./doc/screenshots/.DS_Store)
![](./doc/screenshots/document-short.png)
## Disclaimers / important information
## Demo
@ -77,28 +76,13 @@ Prerequisite: **OnlyOffice should be public**, see previous section.
* Select `Nextcloud` and give your Nextcloud installation domain, e.g. `yunohost.domain/nextcloud`.
* Create a new document and enjoy!
## Documentation
## Documentation and resources
* Official documentation: Link to the official documentation of this app
* YunoHost documentation: https://yunohost.org/#/app_onlyoffice
## YunoHost specific features
#### Multi-user support
#### Supported architectures
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/onlyoffice%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/onlyoffice/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/onlyoffice%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/onlyoffice/)
## Links
* Report a bug: https://github.com/YunoHost-Apps/onlyoffice_ynh/issues
* App website: https://www.onlyoffice.com
* GitHub App website: https://github.com/ONLYOFFICE/DocumentServer
* YunoHost website: https://yunohost.org/
---
* Official app website: https://www.onlyoffice.com
* Official user documentation: https://yunohost.org/#/app_onlyoffice
* Upstream app code repository: https://github.com/ONLYOFFICE/DocumentServer
* YunoHost documentation for this app: https://yunohost.org/app_onlyoffice
* Report a bug: https://github.com/YunoHost-Apps/onlyoffice_ynh/issues
## Developer info
@ -110,3 +94,5 @@ sudo yunohost app install https://github.com/YunoHost-Apps/onlyoffice_ynh/tree/t
or
sudo yunohost app upgrade onlyoffice -u https://github.com/YunoHost-Apps/onlyoffice_ynh/tree/testing --debug
```
**More info regarding app packaging:** https://yunohost.org/packaging_apps

View file

@ -1,33 +1,28 @@
# OnlyOffice Server pour YunoHost
# OnlyOffice pour YunoHost
[![Integration level](https://dash.yunohost.org/integration/onlyoffice.svg)](https://dash.yunohost.org/appci/app/onlyoffice) ![](https://ci-apps.yunohost.org/ci/badges/onlyoffice.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/onlyoffice.maintain.svg)
[![Niveau d'intégration](https://dash.yunohost.org/integration/onlyoffice.svg)](https://dash.yunohost.org/appci/app/onlyoffice) ![](https://ci-apps.yunohost.org/ci/badges/onlyoffice.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/onlyoffice.maintain.svg)
[![Installer OnlyOffice avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=onlyoffice)
*[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 OnlyOffice rapidement et simplement sur un serveur YunoHost.
Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install) pour apprendre comment l'installer.*
> *Ce package vous permet d'installer OnlyOffice 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.*
## Vue d'ensemble
OnlyOffice Document Server est une suite bureautique en ligne comprenant des visualiseurs et des éditeurs de textes, feuilles de calcul et présentations, entièrement compatible avec les formats Office Open XML: .docx, .xlsx, .pptx et permettant l'édition collaborative en temps réel.
Créez et éditer des documents collaborativement
L'édition collaborative en ligne des documents OnlyOffice nécessite :
1. une partie serveur, avec deux options d'installation :
1. OnlyOffice Document Server packagé pour YunoHost.
2. Le [Community Document Server pour Nextcloud](https://apps.nextcloud.com/apps/documentserver_community).
**Version incluse :** 6.1.0~ynh2
2. une partie client, telle que :
1. [ONLYOFFICE connector pour Nextcloud](https://apps.nextcloud.com/apps/onlyoffice)
2. [ONLYOFFICE Desktop Editors](https://www.onlyoffice.com/fr/download-desktop.aspx)
Les utilisateurs de Nextcloud peuvent suivre [ce tutoriel](https://github.com/YunoHost-Apps/nextcloud_ynh/blob/testing/README_fr.md#configurer-lint%C3%A9gration-donlyoffice) pour installer le Community Document Server (1.ii) et ONLYOFFICE connector (2.i) sur une instance Nextcloud. Cependant, les performances et l'architecture sont limitées.
**Version incluse :** 6.1.0
**Démo :** https://www.onlyoffice.com/fr/download-desktop.aspx
## Captures d'écran
![](https://static-www.onlyoffice.com/v9.5.0/images/mainpage/may2018/editors/document-short.jpg)
![](./doc/screenshots/.DS_Store)
![](./doc/screenshots/document-short.png)
## Avertissements / informations importantes
## Démo
@ -77,32 +72,17 @@ Prérequis : **OnlyOffice doit être public**, voir la section précédente.
* Sélectionnez `Nextcloud` et donnez votre domaine d'installation Nextcloud, par exemple `yunohost.domain/nextcloud`.
* Créez un nouveau document !
## Documentation
## Documentations et ressources
* Documentation officielle : Lien vers la documentation officielle de cette application.
* Documentation YunoHost : https://yunohost.org/fr/app_onlyoffice
## Caractéristiques spécifiques YunoHost
#### Support multi-utilisateur
#### Architectures supportées
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/onlyoffice%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/onlyoffice/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/onlyoffice%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/onlyoffice/)
## Liens
* Signaler un bug : https://github.com/YunoHost-Apps/onlyoffice_ynh/issues
* Site de l'application : https://www.onlyoffice.com
* Dépôt de l'application principale : https://github.com/ONLYOFFICE/DocumentServer
* Site web YunoHost : https://yunohost.org/
---
* Site officiel de l'app : https://www.onlyoffice.com
* Documentation officielle utilisateur : https://yunohost.org/#/app_onlyoffice
* Dépôt de code officiel de l'app : https://github.com/ONLYOFFICE/DocumentServer
* Documentation YunoHost pour cette app : https://yunohost.org/app_onlyoffice
* Signaler un bug : https://github.com/YunoHost-Apps/onlyoffice_ynh/issues
## Informations pour les développeurs
Merci de faire vos pull request sur la [testing branch](https://github.com/YunoHost-Apps/onlyoffice_ynh/tree/testing).
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/onlyoffice_ynh/tree/testing).
Pour essayer la branche testing, procédez comme suit.
```
@ -110,3 +90,5 @@ sudo yunohost app install https://github.com/YunoHost-Apps/onlyoffice_ynh/tree/t
ou
sudo yunohost app upgrade onlyoffice -u https://github.com/YunoHost-Apps/onlyoffice_ynh/tree/testing --debug
```
**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps

View file

@ -1,14 +1,9 @@
# See here for more informations
# https://github.com/YunoHost/package_check#syntax-check_process-file
# Move this file from check_process.default to check_process when you have filled it.
;; Test complet
; Manifest
domain="domain.tld" (DOMAIN)
path="/path" (PATH)
domain="domain.tld"
path="/path"
nextclouddomain="domain.tld"
is_public=1 (PUBLIC|public=1|private=0)
is_public=1
; Checks
pkg_linter=1
setup_sub_dir=1
@ -17,11 +12,14 @@
setup_private=1
setup_public=1
upgrade=1
upgrade=1 from_commit=eca1121ff00c59325227163109d11c46bbff8e03
backup_restore=1
multi_instance=0
incorrect_path=1
port_already_use=0
change_url=1
;;; Options
Email=
Notification=none
;;; Upgrade options
; commit=eca1121ff00c59325227163109d11c46bbff8e03
name=Merge pull request #57 from YunoHost-Apps/testing
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666&

BIN
doc/.DS_Store vendored Normal file

Binary file not shown.

47
doc/DISCLAIMER.md Normal file
View file

@ -0,0 +1,47 @@
## Demo
* A free 30 days demo of Document Server is available from OnlyOffice connector for Nextcloud:
* Install Nextcloud and the ONLYOFFICE app (connector).
* Go in the Nextcloud administrator settings, section ONLYOFFICE.
* Tick the box `Connection to demo ONLYOFFICE Document Server` in Server Parameters.
* Some testing is also possible using [ONLYOFFICE Desktop Editor](https://www.onlyoffice.com/fr/download-desktop.aspx).
## Prerequisite
You should not install OnlyOffice on your main YunoHost domain, especially if you want to use it with a Nextcloud installed on the same domain.
* Add a new domain for OnlyOffice in YunoHost.
* If your main YunoHost domain was provided by YunoHost, e.g. `domain.nohost.me`, then you don't have to buy/register a new domain name.
* Just click on `I already have a domain`.
* Type e.g. `office.domain.nohost.me` and click on `Add`.
* Add a Let's Encrypt certificate for this domain.
## Configuration of OnlyOffice Server
* Assuming that:
* `yunohost.domain` is your main YunoHost domain.
* You have configured `office.yunohost.domain` for OnlyOffice, see Prerequisite above.
* You have Nextcloud installed on `yunohost.domain/nextcloud` or `nextcloud.yunohost.domain`.
* Install `onlyoffice` using CLI or webadmin.
* Choose a domain name for OnlyOffice that is different from your Nextcloud domain, e.g. `office.yunohost.domain` (or `office.domain.nohost.me`, see previous section).
* Choose a path for OnlyOffice, e.g. `/` if you install on `office.yunohost.domain` (do not install any other app on this domain).
* The domain of your Nextcloud instance, e.g. `yunohost.domain/nextcloud` or `nextcloud.yunohost.domain`.
* Is it a public application? **If you want to connect it to Nextcloud, OnlyOffice should be public**: then select `Yes` or `tick the box`.
## How to edit OnlyOffice documents?
### Web Edition in Nextcloud
Prerequisite: **OnlyOffice should be public**, see previous section.
* In Nextcloud apps store, install `ONLYOFFICE`, i.e. the [ONLYOFFICE connector for Nextcloud](https://apps.nextcloud.com/apps/onlyoffice).
* Go in the Nextcloud `settings` > `Administration` > `ONLYOFFICE` > `Server settings` > `Address of the Document Server`.
* Give the installation domain of your `onlyoffice`, e.g. `https://office.yunohost.domain/` and click `Save`.
* Create a new document and enjoy!
### Desktop Edition on PC
* Download and install a [ONLYOFFICE Desktop Editors](https://www.onlyoffice.com/fr/download-desktop.aspx).
* Start ONLYOFFICE and Go to `Connect to cloud` > `Add cloud`.
* Select `ONLYOFFICE` and give the installation domain of your `onlyoffice`, e.g. `office.yunohost.domain`
* or (only if you connected `onlyoffice` to Nextcloud, see previous section).
* Select `Nextcloud` and give your Nextcloud installation domain, e.g. `yunohost.domain/nextcloud`.
* Create a new document and enjoy!

47
doc/DISCLAIMER_fr.md Normal file
View file

@ -0,0 +1,47 @@
## Démo
* Une démo gratuite de 30 jours de Document Server est disponible à partir du connecteur OnlyOffice pour Nextcloud:
* Installez Nextcloud et l'application ONLYOFFICE (connector).
* Allez dans les paramètres de l'administrateur Nextcloud, section ONLYOFFICE.
* Cochez la case `Connexion à la démonstration ONLYOFFICE Document Server` dans les paramètres du serveur.
* Certains tests sont également possibles en utilisant [ONLYOFFICE Desktop Editor](https://www.onlyoffice.com/fr/download-desktop.aspx).
## Prérequis
Vous ne devez pas installer OnlyOffice sur votre domaine YunoHost principal, surtout si vous souhaitez l'utiliser avec une instance Nextcloud installée sur le même domaine.
* Ajouter un nouveau domaine pour OnlyOffice dans YunoHost
* Si votre domaine YunoHost principal a été fourni par YunoHost, par exemple `domain.nohost.me`, alors vous n'avez pas à acheter/enregistrer un nouveau nom de domaine.
* Cliquez simplement sur `J'ai déjà un nom de domaine`.
* Tapez par exemple `office.domain.nohost.me` et cliquez sur `Ajouter`.
* Ajoutez un certificat Let's Encrypt pour ce domaine.
## Configuration de OnlyOffice Server
* Supposons que :
* `yunohost.domain` est votre domaine principal YunoHost.
* Vous avez configuré `office.yunohost.domain` pour OnlyOffice, voir Prérequis ci-dessus
* Vous avez Nextcloud installé sur `yunohost.domain / nextcloud` ou `nextcloud.yunohost.domain`.
* Installez `onlyoffice` à l'aide de la CLI ou de l'administrateur Web
* choisissez un nom de domaine pour OnlyOffice différent de votre domaine Nextcloud, par exemple `office.yunohost.domain` (ou `office.domain.nohost.me`, voir section précédente).
* Choisissez un chemin pour OnlyOffice, par exemple `/` si vous installez sur `office.yunohost.domain` (n'installez aucune autre application sur ce domaine).
* Le domaine de votre instance Nextcloud, par exemple `yunohost.domain / nextcloud` ou `nextcloud.yunohost.domain`.
* Est-ce une application publique ? **Si vous souhaitez le connecter à Nextcloud, OnlyOffice doit être public** : puis sélectionnez `Oui` ou `cochez la case`.
## Comment éditer des documents OnlyOffice ?
### Web Édition dans Nextcloud
Prérequis : **OnlyOffice doit être public**, voir la section précédente.
* dans le magasin d'applications Nextcloud, installez `ONLYOFFICE`, c'est-à-dire le [connecteur OnlyOffice pour Nextcloud](https://apps.nextcloud.com/apps/onlyoffice)
* Allez dans Nextcloud `Paramètres` > `Administration` > `ONLYOFFICE` > `Paramètres du serveur` > `Adresse du service d'édition de document`.
* Spécifiez le domaine d'installation de votre serveur `onlyoffice`, par exemple `https://office.yunohost.domain/` et cliquez sur `Enregistrer`.
* Créez un nouveau document !
### Desktop Édition sur PC
* Téléchargez et installez [ONLYOFFICE Desktop Editors](https://www.onlyoffice.com/fr/download-desktop.aspx)
* Démarrez l'éditeur et allez dans `Connecter au Cloud` > `Ajouter cloud`
* sélectionnez ONLYOFFICE et indiquez le domaine d'installation de votre server OnlyOffice, par ex. `office.yunohost.domain`
* ou (uniquement si vous avez connecté `onlyoffice` à Nextcloud, voir section précédente).
* Sélectionnez `Nextcloud` et donnez votre domaine d'installation Nextcloud, par exemple `yunohost.domain/nextcloud`.
* Créez un nouveau document !

BIN
doc/screenshots/.DS_Store vendored Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 245 KiB

View file

@ -6,15 +6,22 @@
"en": "Create and edit documents collaboratively",
"fr": "Créez et éditer des documents collaborativement"
},
"version": "6.1.0~ynh1",
"version": "6.1.0~ynh2",
"url": "https://www.onlyoffice.com",
"upstream": {
"license": "GPL-3.0-or-later",
"website": "https://www.onlyoffice.com",
"demo": "https://www.onlyoffice.com/fr/download-desktop.aspx",
"userdoc": "https://yunohost.org/#/app_onlyoffice",
"code": "https://github.com/ONLYOFFICE/DocumentServer"
},
"license": "GPL-3.0-or-later",
"maintainer": {
"name": "liberodark",
"email": "liberodark@gmail.com"
},
"requirements": {
"yunohost": ">= 3.8.4"
"yunohost": ">= 4.2.0"
},
"multi_instance": false,
"services": [
@ -25,10 +32,6 @@
{
"name": "domain",
"type": "domain",
"ask": {
"en": "Choose a domain name for OnlyOffice",
"fr": "Choisissez un nom de domaine pour OnlyOffice"
},
"example": "office.yunohost.domain",
"help": {
"en": "You should not install OnlyOffice on your main YunoHost domain, especially if you want to use it with a Nextcloud installed on the same domain.",
@ -38,10 +41,6 @@
{
"name": "path",
"type": "path",
"ask": {
"en": "Choose a path for OnlyOffice",
"fr": "Choisissez un chemin pour OnlyOffice"
},
"example": "/onlyoffice or /",
"help": {
"en": "Root path / if you chose a subdomain, e.g. office.yunohost.domain.",
@ -66,10 +65,6 @@
{
"name": "is_public",
"type": "boolean",
"ask": {
"en": "Is it a public application? If you want to connect the app to Nextcloud: check/true!",
"fr": "Est-ce une application publique ? Si vous voulez connecter l'app à Nextcloud : cochez/true!"
},
"help": {
"en": "You will only be able to connect OnlyOffice to Nextcloud if both apps are public!",
"fr": "Nextcloud et OnlyOffice doivent être des applications publiques si vous voulez les connecter !"

View file

@ -1,18 +0,0 @@
## Problem
- *Description of why you made this PR*
## Solution
- *And how do you fix that problem*
## PR Status
- [ ] Code finished.
- [ ] Tested with Package_check.
- [ ] Fix or enhancement tested.
- [ ] Upgrade from last version tested.
- [ ] Can be reviewed and tested.
## Package_check results
---
*If you have access to [App Continuous Integration for packagers](https://yunohost.org/#/packaging_apps_ci) you can provide a link to the package_check results like below, replacing '-NUM-' in this link by the PR number and USERNAME by your username on the ci-apps-dev. Or you provide a screenshot or a pastebin of the results*
[![Build Status](https://ci-apps-dev.yunohost.org/jenkins/job/onlyoffice_ynh%20PR-NUM-%20(USERNAME)/badge/icon)](https://ci-apps-dev.yunohost.org/jenkins/job/onlyoffice_ynh%20PR-NUM-%20(USERNAME)/)

View file

@ -5,7 +5,7 @@
#=================================================
# dependencies used by the app
pkg_dependencies="postgresql libstdc++6 redis-server rabbitmq-server libcurl4-dev"
pkg_dependencies="postgresql postgresql-contrib libstdc++6 redis-server rabbitmq-server libcurl4-dev"
#=================================================
# PERSONAL HELPERS

View file

@ -30,11 +30,6 @@ ynh_script_progression --message="Loading installation settings..."
port=$(ynh_app_setting_get --app=$app --key=port)
nextclouddomain=$(ynh_app_setting_get --app=$app --key=nextclouddomain)
# Add settings here as needed by your application
#db_name=$(ynh_app_setting_get --app=$app --key=db_name)
#db_user=$db_name
#db_pwd=$(ynh_app_setting_get --app=$app --key=db_pwd)
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================

View file

@ -50,8 +50,8 @@ ynh_script_progression --message="Storing installation settings..."
ynh_app_setting_set --app=$app --key=domain --value=$domain
ynh_app_setting_set --app=$app --key=path --value=$path_url
ynh_app_setting_set --app=$app --key=is_public --value=$is_public
ynh_app_setting_set --app=$app --key=nextclouddomain --value=$nextclouddomain
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
#=================================================
# STANDARD MODIFICATIONS
@ -64,6 +64,14 @@ ynh_script_progression --message="Finding an available port..."
port=$(ynh_find_port --port=8095)
ynh_app_setting_set --app=$app --key=port --value=$port
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Configuring system user..."
# Create a system user
ynh_system_user_create --username=$app
#=================================================
# ADD ONLYOFFICE REPOSITORY
#=================================================
@ -77,7 +85,7 @@ ynh_install_extra_repo --repo="deb http://download.onlyoffice.com/repo/debian sq
#=================================================
ynh_script_progression --message="Installing dependencies..."
ynh_install_app_dependencies $pkg_dependencies
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
#=================================================
# CREATE A POSTGRESQL DATABASE
@ -86,20 +94,9 @@ ynh_script_progression --message="Creating a PostgreSQL database..."
db_name=$(ynh_sanitize_dbid --db_name=$app)
db_user=$db_name
db_pwd=$(ynh_string_random --length=32)
ynh_app_setting_set --app=$app --key=db_name --value=$db_name
ynh_app_setting_set --app=$app --key=db_pwd --value=$db_pwd
ynh_psql_test_if_first_run
ynh_psql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_script_progression --message="Setting up source files..."
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
# Download, check integrity, uncompress and patch the source from app.src
#ynh_setup_source --dest_dir="$final_path"
ynh_psql_setup_db --db_user=$db_name --db_name=$db_name
#=================================================
# NGINX CONFIGURATION
@ -115,14 +112,6 @@ fi
# Create a dedicated NGINX config
ynh_add_nginx_config "nextclouddomain"
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Configuring system user..."
# Create a system user
ynh_system_user_create --username=$app
#=================================================
# SPECIFIC SETUP
#=================================================
@ -145,7 +134,7 @@ ynh_script_progression --message="Install OnlyOffice..."
# the install/configure of their package, which is awful since that will
# restart nginx and the whole webadmin and maybe even the yunohost command
# running the install ...
ynh_add_app_dependencies --package="onlyoffice-documentserver"
ynh_exec_warn_less ynh_add_app_dependencies --package="onlyoffice-documentserver"
#=================================================
# MODIFY A CONFIG FILE
@ -183,13 +172,12 @@ ynh_script_progression --message="Generating fonts..."
#=================================================
# SETUP SSOWAT
#=================================================
ynh_script_progression --message="Configuring SSOwat..."
ynh_script_progression --message="Configuring permissions..."
# Make app public if necessary
if [ $is_public -eq 1 ]
then
# unprotected_uris allows SSO credentials to be passed anyway.
ynh_app_setting_set --app=$app --key=unprotected_uris --value="/"
ynh_permission_update --permission="main" --add="visitors"
fi
#=================================================

View file

@ -87,7 +87,7 @@ ynh_script_progression --message="Removing file..."
# Remove a directory securely
ynh_secure_remove --file="/etc/onlyoffice"
ynh_secure_remove --file="/var/lib/onlyoffice"
ynh_secure_remove --file="/var/cache/nginx/onlyoffice"
#ynh_secure_remove --file="/var/cache/nginx/onlyoffice"
# Remove the log files
ynh_secure_remove --file="/var/log/$app"
@ -100,7 +100,7 @@ ynh_secure_remove --file="/var/log/$app"
ynh_script_progression --message="Removing the dedicated system user..."
# Delete a system user
gpasswd -d www-data onlyoffice
#gpasswd -d www-data onlyoffice
ynh_system_user_delete --username=$app
#=================================================

View file

@ -26,10 +26,9 @@ app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get --app=$app --key=domain)
path_url=$(ynh_app_setting_get --app=$app --key=path)
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
db_user=$db_name
db_pwd=$(ynh_app_setting_get --app=$app --key=db_pwd)
db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd)
port=$(ynh_app_setting_get --app=$app --key=port)
nextclouddomain=$(ynh_app_setting_get --app=$app --key=nextclouddomain)
@ -74,7 +73,7 @@ ynh_install_extra_repo --repo="deb http://download.onlyoffice.com/repo/debian sq
ynh_script_progression --message="Reinstalling dependencies..."
# Define and install dependencies
ynh_install_app_dependencies $pkg_dependencies
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
#=================================================
# RESTORE THE POSTGRESQL DATABASE
@ -101,7 +100,7 @@ echo onlyoffice-documentserver onlyoffice/db-name string $db_name | debconf-set-
#=================================================
ynh_script_progression --message="Reinstalling OnlyOffice..."
ynh_add_app_dependencies --package="onlyoffice-documentserver"
ynh_exec_warn_less ynh_add_app_dependencies --package="onlyoffice-documentserver"
#=================================================
# RESTORE THE CONFIGURATION

View file

@ -18,10 +18,9 @@ app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get --app=$app --key=domain)
path_url=$(ynh_app_setting_get --app=$app --key=path)
is_public=$(ynh_app_setting_get --app=$app --key=is_public)
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
db_user=$db_name
db_pwd=$(ynh_app_setting_get --app=$app --key=db_pwd)
db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd)
port=$(ynh_app_setting_get --app=$app --key=port)
nextclouddomain=$(ynh_app_setting_get --app=$app --key=nextclouddomain)
@ -30,15 +29,6 @@ nextclouddomain=$(ynh_app_setting_get --app=$app --key=nextclouddomain)
#=================================================
ynh_script_progression --message="Ensuring downward compatibility..."
# Fix is_public as a boolean value
if [ "$is_public" = "Yes" ]; then
ynh_app_setting_set --app=$app --key=is_public --value=1
is_public=1
elif [ "$is_public" = "No" ]; then
ynh_app_setting_set --app=$app --key=is_public --value=0
is_public=0
fi
# If db_name doesn't exist, create it
if [ -z "$db_name" ]; then
db_name=$(ynh_sanitize_dbid --db_name=$app)
@ -51,6 +41,19 @@ if [ -z "$final_path" ]; then
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
fi
if [ -z "$db_pwd" ]; then
db_pwd=$(ynh_app_setting_get --app=$app --key=db_pwd)
ynh_app_setting_set --app=$app --key=db_pwd
ynh_app_setting_set --app=$app --key=psqlpwd --value=$db_pwd
fi
# Cleaning legacy permissions
if ynh_legacy_permissions_exists; then
ynh_legacy_permissions_delete_all
ynh_app_setting_delete --app=$app --key=is_public
fi
ynh_secure_remove --file="/etc/apt/sources.list.d/onlyoffice.list"
ynh_secure_remove --file="/etc/apt/sources.list.d/nodesource.list"
@ -68,6 +71,14 @@ ynh_clean_setup () {
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Making sure dedicated system user exists..."
# Create a dedicated user (if not existing)
ynh_system_user_create --username=$app
#=================================================
# STANDARD UPGRADE STEPS
#=================================================
@ -89,15 +100,7 @@ ynh_add_nginx_config "nextclouddomain"
#=================================================
ynh_script_progression --message="Upgrading dependencies..."
ynh_install_app_dependencies $pkg_dependencies
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Making sure dedicated system user exists..."
# Create a dedicated user (if not existing)
ynh_system_user_create --username=$app
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
#=================================================
# SPECIFIC UPGRADE
@ -126,7 +129,7 @@ echo onlyoffice-documentserver onlyoffice/db-name string $db_name | debconf-set-
#=================================================
ynh_script_progression --message="Upgrading OnlyOffice..."
ynh_add_app_dependencies --package="onlyoffice-documentserver"
ynh_exec_warn_less ynh_add_app_dependencies --package="onlyoffice-documentserver"
#=================================================
# MODIFY A CONFIG FILE
@ -149,18 +152,6 @@ ynh_script_progression --message="Generating fonts..."
#=================================================
# GENERIC FINALIZATION
#=================================================
# SETUP SSOWAT
#=================================================
ynh_script_progression --message="Upgrading SSOwat configuration..."
# Make app public if necessary
if [ $is_public -eq 1 ]
then
# unprotected_uris allows SSO credentials to be passed anyway
ynh_app_setting_set --app=$app --key=unprotected_uris --value="/"
fi
#=================================================
# RELOAD ONLYOFFICE
#=================================================