Add a bit of a bonus section for editing the target directory
This commit is contained in:
parent
51a20346e2
commit
39e95e628f
|
@ -352,4 +352,57 @@ $ cd ..
|
||||||
|
|
||||||
Install the resulting `deb` file and we're set - LibreOffice Online, in a Debian package. To install it on another machine, all we need are the packages generated by this guide (`libpoco-dev` and friends, and `loolwsd`).
|
Install the resulting `deb` file and we're set - LibreOffice Online, in a Debian package. To install it on another machine, all we need are the packages generated by this guide (`libpoco-dev` and friends, and `loolwsd`).
|
||||||
|
|
||||||
I hope this helps you avoid many hours of headache! I'll document the configuration and integration of LibreOffice Online in another post. Happy editing!
|
### Bonus - Changing the LibreOffice Online directory
|
||||||
|
|
||||||
|
By default, the LibreOffice Online package installs the main configuration of the `loolwsd` service under `/opt/lool`. I'm not a fan of putting anything under `/opt` however, and in BLSE2 everything that is per-server and not automated via configuration management goes under `/srv`. If you also desire this, it's very straightforward to edit the Debian configuration to support installing to an arbitrary target directory before building the package.
|
||||||
|
|
||||||
|
```
|
||||||
|
$ cd ~/loolwsd/online/
|
||||||
|
$ vim debian/loolwsd.postinst.in
|
||||||
|
@@ -7,24 +7,24 @@ case "$1" in
|
||||||
|
setcap cap_fowner,cap_mknod,cap_sys_chroot=ep /usr/bin/loolforkit || true
|
||||||
|
setcap cap_sys_admin=ep /usr/bin/loolmount || true
|
||||||
|
|
||||||
|
- adduser --quiet --system --group --home /opt/lool lool
|
||||||
|
+ adduser --quiet --system --group --home /srv/lool lool
|
||||||
|
mkdir -p /var/cache/loolwsd && chown lool: /var/cache/loolwsd
|
||||||
|
rm -rf /var/cache/loolwsd/*
|
||||||
|
chown lool: /etc/loolwsd/loolwsd.xml
|
||||||
|
chmod 640 /etc/loolwsd/loolwsd.xml
|
||||||
|
|
||||||
|
# We assume that the LibreOffice to be used is built TDF-style
|
||||||
|
- # and installs in @LO_PATH@, and that /opt/lool is
|
||||||
|
+ # and installs in @LO_PATH@, and that /srv/lool is
|
||||||
|
# on the same file system
|
||||||
|
|
||||||
|
- rm -rf /opt/lool
|
||||||
|
- mkdir -p /opt/lool/child-roots
|
||||||
|
- chown lool: /opt/lool
|
||||||
|
- chown lool: /opt/lool/child-roots
|
||||||
|
+ rm -rf /srv/lool
|
||||||
|
+ mkdir -p /srv/lool/child-roots
|
||||||
|
+ chown lool: /srv/lool
|
||||||
|
+ chown lool: /srv/lool/child-roots
|
||||||
|
|
||||||
|
fc-cache @LO_PATH@/share/fonts/truetype
|
||||||
|
|
||||||
|
- su lool --shell=/bin/sh -c "loolwsd-systemplate-setup /opt/lool/systemplate @LO_PATH@ >/dev/null 2>&1"
|
||||||
|
+ su lool --shell=/bin/sh -c "loolwsd-systemplate-setup /srv/lool/systemplate @LO_PATH@ >/dev/null 2>&1"
|
||||||
|
;;
|
||||||
|
|
||||||
|
esac
|
||||||
|
$ vim debian/loolwsd.service
|
||||||
|
@@ -4,7 +4,7 @@ After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
EnvironmentFile=-/etc/sysconfig/loolwsd
|
||||||
|
-ExecStart=/usr/bin/loolwsd --version --o:sys_template_path=/opt/lool/systemplate --o:lo_template_path=/opt/collaboraoffice5.3 --o:child_root_path=/opt/lool/child-roots --o:file_server_root_path=/usr/share/loolwsd
|
||||||
|
+ExecStart=/usr/bin/loolwsd --version --o:sys_template_path=/srv/lool/systemplate --o:lo_template_path=/srv/collaboraoffice5.3 --o:child_root_path=/srv/lool/child-roots --o:file_server_root_path=/usr/share/loolwsd
|
||||||
|
User=lool
|
||||||
|
KillMode=control-group
|
||||||
|
Restart=always
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
I hope this helps you avoid many hours of headache! I'll document the configuration and integration of LibreOffice Online in another post. Happy building!
|
||||||
|
|
Loading…
Reference in New Issue