Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update loolwsd to coolwsd #14

Merged
merged 2 commits into from Nov 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 9 additions & 9 deletions README.rst
Expand Up @@ -13,7 +13,7 @@ Collabora Online requires a dedicated virtual host and it's only accessible from

To configure Collobora Online, execute: ::

config setprop loolwsd VirtualHost collabora.yourdomain.com
config setprop coolwsd VirtualHost collabora.yourdomain.com
signal-event nethserver-collabora-update

After virtual host configuration, obtain a valid HTTPS certificate via Let's encrypt from ``Server certificate`` section of Server Manager interface.
Expand All @@ -27,9 +27,9 @@ The package does the following:
Database
========

The configuration is stored inside the ``configuration`` db, under the ``loolwsd`` key. To show it: ::
The configuration is stored inside the ``configuration`` db, under the ``coolwsd`` key. To show it: ::

config show loolwsd
config show coolwsd

Properties:

Expand All @@ -38,20 +38,20 @@ Properties:

examples: ::

config setprop loolwsd VirtualHost loolwsd-dev.nethserver.net AllowWopiHost nextcloud-office.yourdomain.com
config show loolwsd
loolwsd=service
config setprop coolwsd VirtualHost coolwsd-dev.nethserver.net AllowWopiHost nextcloud-office.yourdomain.com
config show coolwsd
coolwsd=service
AllowWopiHost=nextcloud-office.yourdomain.com
VirtualHost=loolwsd-dev.nethserver.net
VirtualHost=coolwsd-dev.nethserver.net
status=enable


Admin user
==========

After installation, admin dashboard can be enable with ``loolconfig set-admin-password`` and accessible at: ::
After installation, admin dashboard can be enable with ``coolconfig set-admin-password`` and accessible at: ::

https://collabora.yourdomain.com/loleaflet/dist/admin/admin.html
https://collabora.yourdomain.com/browser/dist/admin/admin.html


Collabora repository
Expand Down
2 changes: 1 addition & 1 deletion createlinks
Expand Up @@ -15,7 +15,7 @@ event_templates($event, qw(

event_services($event, qw(
httpd reload
loolwsd restart
coolwsd restart
));

$event = 'nethserver-nextcloud-update';
Expand Down
4 changes: 2 additions & 2 deletions nethserver-collabora.spec
Expand Up @@ -6,8 +6,8 @@ License: GPL
Source: %{name}-%{version}.tar.gz
BuildArch: noarch

Requires: loolwsd >= 4.2.0 CODE-brand
Requires: collaboraoffice6.4-dict-en
Requires: coolwsd CODE-brand
Requires: collaboraoffice-dict-en

BuildRequires: nethserver-devtools

Expand Down
6 changes: 6 additions & 0 deletions root/etc/e-smith/db/configuration/migrate/migrateloolwsd
@@ -0,0 +1,6 @@
{
my $loolwsd = $DB->get("loolwsd") or return;
my $coolwsd = $DB->get("coolwsd") || $DB->new_record("coolwsd", { type => "service" });
$coolwsd->merge_props($loolwsd->props);
$loolwsd->delete;
}
16 changes: 8 additions & 8 deletions root/etc/e-smith/events/actions/nethserver-collabora-conf
Expand Up @@ -20,10 +20,10 @@
#!/bin/bash

# Disable ssl
loolconfig set ssl.enable false
loolconfig set ssl.termination true
loolconfig set net.listen loopback
loolconfig set net.proto IPv4
coolconfig set ssl.enable false
coolconfig set ssl.termination true
coolconfig set net.listen loopback
coolconfig set net.proto IPv4


#Generate a list of hosts that can access to the wopi storage
Expand All @@ -34,19 +34,19 @@ AllowWopiHosts=`hostname`
if [[ -n `/sbin/e-smith/config getprop nextcloud VirtualHost` ]];then AllowWopiHosts+="|`/sbin/e-smith/config getprop nextcloud VirtualHost`";fi

#Additional external host
if [[ -n `/sbin/e-smith/config getprop loolwsd AllowWopiHost` ]];then AllowWopiHosts+="|`/sbin/e-smith/config getprop loolwsd AllowWopiHost`";fi
if [[ -n `/sbin/e-smith/config getprop coolwsd AllowWopiHost` ]];then AllowWopiHosts+="|`/sbin/e-smith/config getprop coolwsd AllowWopiHost`";fi

loolconfig set storage.wopi.host "$AllowWopiHosts"
coolconfig set storage.wopi.host "$AllowWopiHosts"


if [[ -n `/sbin/e-smith/config getprop loolwsd VirtualHost` ]]; then
if [[ -n `/sbin/e-smith/config getprop coolwsd VirtualHost` ]]; then

#Configure Nethserver-Nextcloud
if [[ -x "/usr/local/sbin/occ" ]]; then

/usr/local/sbin/occ app:install richdocuments

/usr/local/sbin/occ config:app:set richdocuments wopi_url --value=https://`/sbin/e-smith/config getprop loolwsd VirtualHost`
/usr/local/sbin/occ config:app:set richdocuments wopi_url --value=https://`/sbin/e-smith/config getprop coolwsd VirtualHost`

/usr/local/sbin/occ app:enable richdocuments
fi
Expand Down
@@ -1,8 +1,11 @@
{
my $domain = $loolwsd{'VirtualHost'} || '';
my $domain = $coolwsd{'VirtualHost'} || '';

if ($domain ne '') {
$OUT .= "<VirtualHost *:443>\n";

$OUT .= " Options -Indexes\n";

$OUT .= " ServerName $domain\n";

$OUT .= " SSLEngine on\n";
Expand All @@ -13,24 +16,28 @@
$OUT .= " # keep the host\n";
$OUT .= " ProxyPreserveHost On\n";

$OUT .= " # static html, js, images, etc. served from loolwsd\n";
$OUT .= " # loleaflet is the client part of LibreOffice Online\n";
$OUT .= " ProxyPass /loleaflet http://127.0.0.1:9980/loleaflet retry=0\n";
$OUT .= " ProxyPassReverse /loleaflet http://127.0.0.1:9980/loleaflet\n";
$OUT .= " # static html, js, images, etc. served from coolwsd\n";
$OUT .= " # browser is the client part of LibreOffice Online\n";
$OUT .= " ProxyPass /browser http://127.0.0.1:9980/browser retry=0\n";
$OUT .= " ProxyPassReverse /browser http://127.0.0.1:9980/browser\n";

$OUT .= " # WOPI discovery URL\n";
$OUT .= " ProxyPass /hosting/discovery http://127.0.0.1:9980/hosting/discovery retry=0\n";
$OUT .= " ProxyPassReverse /hosting/discovery http://127.0.0.1:9980/hosting/discovery\n";

$OUT .= " # Main websocket\n";
$OUT .= " ProxyPassMatch \"/lool/(.*)/ws\$\" ws://127.0.0.1:9980/lool/\$1/ws nocanon\n";
$OUT .= " ProxyPassMatch \"/cool/(.*)/ws\$\" ws://127.0.0.1:9980/cool/\$1/ws nocanon\n";

$OUT .= " # Admin Console websocket\n";
$OUT .= " ProxyPass /lool/adminws ws://127.0.0.1:9980/lool/adminws\n";
$OUT .= " ProxyPass /cool/adminws ws://127.0.0.1:9980/cool/adminws\n";

$OUT .= " # Download as, Fullscreen presentation and Image upload operations\n";
$OUT .= " ProxyPass /lool http://127.0.0.1:9980/lool\n";
$OUT .= " ProxyPassReverse /lool http://127.0.0.1:9980/lool\n";
$OUT .= " ProxyPass /cool http://127.0.0.1:9980/cool\n";
$OUT .= " ProxyPassReverse /cool http://127.0.0.1:9980/cool\n";

$OUT .= " # Compatibility with integrations that use the /lool/convert-to endpoint\n";
$OUT .= " ProxyPass /lool http://127.0.0.1:9980/cool\n";
$OUT .= " ProxyPassReverse /lool http://127.0.0.1:9980/cool\n";

$OUT .= " # Endpoint with information about availability of various features\n";
$OUT .= " ProxyPass /hosting/capabilities http://127.0.0.1:9980/hosting/capabilities retry=0\n";
Expand Down