From 3bc7bf70cc107853958b13bf93ce92be2dfb8cc1 Mon Sep 17 00:00:00 2001 From: Nicolas Frandeboeuf Date: Wed, 5 Jul 2023 11:58:44 +0200 Subject: [PATCH 1/8] [doc] Specify how to retrieve the secret key for Nextcloud --- doc/DISCLAIMER.md | 4 +++- doc/DISCLAIMER_fr.md | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md index 7511944..43b3a11 100644 --- a/doc/DISCLAIMER.md +++ b/doc/DISCLAIMER.md @@ -34,7 +34,9 @@ You should not install ONLYOFFICE on your main YunoHost domain, especially if yo 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`. +* Give the installation domain of your `onlyoffice`, e.g. `https://office.yunohost.domain/`. +* Give the secret key that was sent to you by email during the install (you can also retrieve it with the CLI command `sudo documentserver-jwt-status.sh`). +* Click `Save`. * Create a new document and enjoy! ### Desktop Edition on PC diff --git a/doc/DISCLAIMER_fr.md b/doc/DISCLAIMER_fr.md index af2a969..e828325 100644 --- a/doc/DISCLAIMER_fr.md +++ b/doc/DISCLAIMER_fr.md @@ -34,7 +34,9 @@ Vous ne devez pas installer ONLYOFFICE sur votre domaine YunoHost principal, sur 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`. +* Spécifiez le domaine d'installation de votre serveur `ONLYOFFICE`, par exemple `https://office.yunohost.domain/`. +* Renseignez la clé secrète qui vous a été envoyée par email lors de l'installation (vous pouvez aussi la retrouve avec la ligne de commande `sudo documentserver-jwt-status.sh`). +* Cliquez sur `Enregistrer`. * Créez un nouveau document ! ### Desktop Édition sur PC From 7360ce0b7d723d5fa44e1a9ebe3d9ba00ec31a32 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 21 Oct 2023 14:27:07 +0000 Subject: [PATCH 2/8] Auto-update README --- README.md | 4 +++- README_fr.md | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5413c8b..af72af8 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,9 @@ You should not install ONLYOFFICE on your main YunoHost domain, especially if yo 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`. +* Give the installation domain of your `onlyoffice`, e.g. `https://office.yunohost.domain/`. +* Give the secret key that was sent to you by email during the install (you can also retrieve it with the CLI command `sudo documentserver-jwt-status.sh`). +* Click `Save`. * Create a new document and enjoy! ### Desktop Edition on PC diff --git a/README_fr.md b/README_fr.md index 93c0ad4..6ead2a9 100644 --- a/README_fr.md +++ b/README_fr.md @@ -76,7 +76,9 @@ Vous ne devez pas installer ONLYOFFICE sur votre domaine YunoHost principal, sur 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`. +* Spécifiez le domaine d'installation de votre serveur `ONLYOFFICE`, par exemple `https://office.yunohost.domain/`. +* Renseignez la clé secrète qui vous a été envoyée par email lors de l'installation (vous pouvez aussi la retrouve avec la ligne de commande `sudo documentserver-jwt-status.sh`). +* Cliquez sur `Enregistrer`. * Créez un nouveau document ! ### Desktop Édition sur PC From bf6c6726ee151f0dce0649b780ff919193efc75c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 21 Oct 2023 16:33:18 +0200 Subject: [PATCH 3/8] Update msg_install --- conf/msg_install | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/conf/msg_install b/conf/msg_install index 227ea45..9ab085e 100644 --- a/conf/msg_install +++ b/conf/msg_install @@ -1,12 +1,10 @@ __APP__ was successfully installed :) -Please open your __APP__ domain: https://__DOMAIN____PATH_URL__ - -To configure OnlyOffice with your Nextcloud, go to the settings: -- In Nextcloud, download ONLYOFFICE app -- under "Administration > ONLYOFFICE > Server settings > -- Address of the Document Server" enter: "https://__DOMAIN____PATH_URL__" -- Secret key" enter "__JWT_SECRET__" +To configure OnlyOffice with Nextcloud: +- Within Nextcloud, install ONLYOFFICE app +- go to the settings under "Administration > ONLYOFFICE > Server settings +- Address of the Document Server: "https://__DOMAIN____PATH_URL__" +- Secret key: "__JWT_SECRET__" OnlyOffice should now work with your Nextcloud! From 3b461aea4c55cd29448e38fd7f640f86ab92a7f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 21 Oct 2023 16:34:53 +0200 Subject: [PATCH 4/8] Update upgrade --- scripts/upgrade | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 5499460..ef45eca 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -142,7 +142,6 @@ ynh_remove_extra_repo --name="$app" # backward compat # ynh_remove_app_dependencies ynh_install_extra_app_dependencies --repo="https://download.onlyoffice.com/repo/debian squeeze main" --package="onlyoffice-documentserver" --key="https://download.onlyoffice.com/GPG-KEY-ONLYOFFICE" - #================================================= # UPDATE A CONFIG FILE #================================================= From c4f6c0f9a48853a1d0ae7c612f8ccde04e469af9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 21 Oct 2023 16:36:54 +0200 Subject: [PATCH 5/8] fix --- scripts/install | 1 - scripts/restore | 5 +++++ scripts/upgrade | 1 - 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index aad7579..c5b85af 100644 --- a/scripts/install +++ b/scripts/install @@ -123,7 +123,6 @@ echo onlyoffice-documentserver onlyoffice/db-pwd password $db_pwd | debconf-set- echo onlyoffice-documentserver onlyoffice/db-name string $db_name | debconf-set-selections #JWT options -echo onlyoffice-documentserver onlyoffice/jwt-enabled boolean true | debconf-set-selections echo onlyoffice-documentserver onlyoffice/jwt-secret password $jwt_secret | debconf-set-selections #================================================= diff --git a/scripts/restore b/scripts/restore index af41ab7..c2e0b9f 100644 --- a/scripts/restore +++ b/scripts/restore @@ -32,6 +32,7 @@ db_user=$db_name 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) +jwt_secret=$(ynh_app_setting_get --app=$app --key=jwt_secret) #================================================= # CHECK IF THE APP CAN BE RESTORED @@ -89,6 +90,9 @@ echo onlyoffice-documentserver onlyoffice/db-user string $db_user | debconf-set- echo onlyoffice-documentserver onlyoffice/db-pwd password $db_pwd | debconf-set-selections echo onlyoffice-documentserver onlyoffice/db-name string $db_name | debconf-set-selections +#JWT options +echo onlyoffice-documentserver onlyoffice/jwt-secret password $jwt_secret | debconf-set-selections + #================================================= # REINSTALL ONLYOFFICE #================================================= @@ -106,6 +110,7 @@ ynh_restore_file --origin_path="/etc/onlyoffice" #================================================= # RESTORE THE CACHE #================================================= + ynh_restore_file --origin_path="/var/lib/onlyoffice/documentserver/App_Data/cache/files" #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index ef45eca..4dc37c7 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -126,7 +126,6 @@ echo onlyoffice-documentserver onlyoffice/db-pwd password $db_pwd | debconf-set- echo onlyoffice-documentserver onlyoffice/db-name string $db_name | debconf-set-selections #JWT options -echo onlyoffice-documentserver onlyoffice/jwt-enabled boolean true | debconf-set-selections echo onlyoffice-documentserver onlyoffice/jwt-secret password $jwt_secret | debconf-set-selections #================================================= From 42317b12a218a1bf6f50002eb6336d31372ca50f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 21 Oct 2023 16:37:58 +0200 Subject: [PATCH 6/8] Update upgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 4dc37c7..f5fc225 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -126,7 +126,7 @@ echo onlyoffice-documentserver onlyoffice/db-pwd password $db_pwd | debconf-set- echo onlyoffice-documentserver onlyoffice/db-name string $db_name | debconf-set-selections #JWT options -echo onlyoffice-documentserver onlyoffice/jwt-secret password $jwt_secret | debconf-set-selections +#echo onlyoffice-documentserver onlyoffice/jwt-secret password $jwt_secret | debconf-set-selections #================================================= # UPGRADE ONLYOFFICE From b252888639ac5b8991b8efbd364bd5d737a8dd1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 21 Oct 2023 21:24:33 +0200 Subject: [PATCH 7/8] Update restore --- scripts/restore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index c2e0b9f..5fc480a 100644 --- a/scripts/restore +++ b/scripts/restore @@ -98,7 +98,7 @@ echo onlyoffice-documentserver onlyoffice/jwt-secret password $jwt_secret | debc #================================================= ynh_script_progression --message="Reinstalling OnlyOffice..." -ynh_install_extra_app_dependencies --repo="https://download.onlyoffice.com/repo/debian squeeze main" --package="onlyoffice-documentserver" --key="https://download.onlyoffice.com/GPG-KEY-ONLYOFFICE" +ynh_exec_warn_less ynh_install_extra_app_dependencies --repo="https://download.onlyoffice.com/repo/debian squeeze main" --package="onlyoffice-documentserver" --key="https://download.onlyoffice.com/GPG-KEY-ONLYOFFICE" #================================================= # RESTORE THE CONFIGURATION From 97a54eb6d3b5f8e6acfee55bd1fdd50da288baf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 21 Oct 2023 21:25:23 +0200 Subject: [PATCH 8/8] cleaning --- scripts/restore | 2 +- scripts/upgrade | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/restore b/scripts/restore index 5fc480a..dfbf236 100644 --- a/scripts/restore +++ b/scripts/restore @@ -91,7 +91,7 @@ echo onlyoffice-documentserver onlyoffice/db-pwd password $db_pwd | debconf-set- echo onlyoffice-documentserver onlyoffice/db-name string $db_name | debconf-set-selections #JWT options -echo onlyoffice-documentserver onlyoffice/jwt-secret password $jwt_secret | debconf-set-selections +#echo onlyoffice-documentserver onlyoffice/jwt-secret password $jwt_secret | debconf-set-selections #================================================= # REINSTALL ONLYOFFICE diff --git a/scripts/upgrade b/scripts/upgrade index f5fc225..3ffa469 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -24,7 +24,7 @@ db_user=$db_name 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) -jwt_secret=$(ynh_app_setting_get --app=$app --key=jwt_secret) +#jwt_secret=$(ynh_app_setting_get --app=$app --key=jwt_secret) #================================================= # CHECK VERSION