2015-08-06 12:01:06 -05:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
configure)
|
2016-04-07 03:49:26 -05:00
|
|
|
setcap cap_fowner,cap_mknod,cap_sys_chroot=ep /usr/bin/loolforkit || true
|
2016-05-20 08:51:05 -05:00
|
|
|
setcap cap_sys_admin=ep /usr/bin/loolmount || true
|
2015-08-06 12:01:06 -05:00
|
|
|
|
|
|
|
adduser --quiet --system --group --home /opt/lool lool
|
2016-01-08 02:24:47 -06:00
|
|
|
mkdir -p /var/cache/loolwsd && chown lool: /var/cache/loolwsd
|
2016-01-08 02:11:58 -06:00
|
|
|
rm -rf /var/cache/loolwsd/*
|
2017-04-29 13:34:44 -05:00
|
|
|
chown lool: /etc/loolwsd/loolwsd.xml
|
|
|
|
chmod 640 /etc/loowsd/loolwsd.xml
|
2015-08-06 12:01:06 -05:00
|
|
|
|
|
|
|
# We assume that the LibreOffice to be used is built TDF-style
|
2017-03-20 17:22:26 -05:00
|
|
|
# and installs in @LO_PATH@, and that /opt/lool is
|
2015-08-06 12:01:06 -05:00
|
|
|
# on the same file system
|
|
|
|
|
2016-01-08 02:22:28 -06:00
|
|
|
rm -rf /opt/lool
|
2015-08-06 12:01:06 -05:00
|
|
|
mkdir -p /opt/lool/child-roots
|
2016-01-08 02:24:47 -06:00
|
|
|
chown lool: /opt/lool
|
|
|
|
chown lool: /opt/lool/child-roots
|
2015-08-06 12:01:06 -05:00
|
|
|
|
2017-04-04 05:12:22 -05:00
|
|
|
fc-cache @LO_PATH@/share/fonts/truetype
|
|
|
|
|
2017-03-20 17:22:26 -05:00
|
|
|
su lool --shell=/bin/sh -c "loolwsd-systemplate-setup /opt/lool/systemplate @LO_PATH@ >/dev/null 2>&1"
|
2015-08-06 12:01:06 -05:00
|
|
|
;;
|
|
|
|
|
|
|
|
esac
|
|
|
|
|
2016-09-25 12:18:38 -05:00
|
|
|
#DEBHELPER#
|