libreoffice-online/debian/loolwsd.postinst.in
Jan Holesovsky 3a03f50784 Revert "Adapt paths to new package name"
It is not a good idea to change the configuration directory, it will affect all the existing installations.

And the service is called loolwsd - so the configuration should be called that way too.

This reverts commit 9278574289.

Change-Id: I7e6eee644e21ad2dd842742585d16133ff8e36c9
Reviewed-on: https://gerrit.libreoffice.org/72730
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-05-22 12:06:06 +02:00

31 lines
739 B
Bash
Executable file

#!/bin/sh
set -e
case "$1" in
configure)
setcap cap_fowner,cap_mknod,cap_sys_chroot=ep /usr/bin/loolforkit || true
adduser --quiet --system --group --home /opt/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
# 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
fc-cache @LO_PATH@/share/fonts/truetype
loolwsd-systemplate-setup /opt/lool/systemplate @LO_PATH@ >/dev/null 2>&1
;;
esac
#DEBHELPER#