libreoffice-online/loolwsd/debian/loolwsd.postinst
Tor Lillqvist d5292541bd Revert "Also chown the random devices to root:root and chmod to 666"
Not needed after all. It was a red herring. The device files work fine
even if not owned by root:root and with mode 664. The actual problem
was that I used a file system mounted with nodev when testing loolwsd.

This reverts commit 509314d559
2016-03-01 18:24:55 +02:00

34 lines
958 B
Bash
Executable file

#!/bin/sh
set -e
case "$1" in
configure)
setcap cap_fowner,cap_mknod,cap_sys_chroot=ep /usr/bin/loolkit || true
setcap cap_fowner,cap_mknod,cap_sys_chroot=ep /usr/bin/loolbroker || true
adduser --quiet --system --group --home /opt/lool lool
mkdir -p /var/cache/loolwsd && chown lool: /var/cache/loolwsd
rm -rf /var/cache/loolwsd/*
# We assume that the LibreOffice to be used is built TDF-style
# and installs in /opt/collaboraoffice5.0, 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
su lool --shell=/bin/sh -c "loolwsd-systemplate-setup /opt/lool/systemplate /opt/collaboraoffice5.0 >/dev/null"
;;
esac
if [ -d /run/systemd/system ]; then
systemctl --system daemon-reload >/dev/null || true
systemctl enable loolwsd.service >/dev/null || true
deb-systemd-invoke start loolwsd.service >/dev/null || true
fi
exit 0