2015-08-06 12:01:06 -05:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
configure)
|
2021-11-16 03:59:05 -06:00
|
|
|
setcap cap_fowner,cap_chown,cap_mknod,cap_sys_chroot=ep /usr/bin/coolforkit || true
|
2021-11-17 11:08:27 -06:00
|
|
|
setcap cap_sys_admin=ep /usr/bin/coolmount || true
|
2015-08-06 12:01:06 -05:00
|
|
|
|
2021-11-15 10:26:31 -06:00
|
|
|
adduser --quiet --system --group --home /opt/cool cool
|
|
|
|
chown cool: /etc/loolwsd/loolwsd.xml
|
2019-05-22 03:41:25 -05:00
|
|
|
chmod 640 /etc/loolwsd/loolwsd.xml
|
2015-08-06 12:01:06 -05:00
|
|
|
|
|
|
|
# We assume that the LibreOffice to be used is built TDF-style
|
2021-11-15 09:57:33 -06:00
|
|
|
# and installs in @LO_PATH@, and that /opt/cool is
|
2015-08-06 12:01:06 -05:00
|
|
|
# on the same file system
|
|
|
|
|
2021-11-15 10:26:31 -06:00
|
|
|
rm -rf /opt/cool
|
2021-11-15 09:51:11 -06:00
|
|
|
mkdir -p /opt/cool/child-roots
|
|
|
|
chown cool: /opt/cool
|
|
|
|
chown cool: /opt/cool/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
|
|
|
|
|
2021-11-15 09:51:11 -06:00
|
|
|
loolwsd-systemplate-setup /opt/cool/systemplate @LO_PATH@ >/dev/null 2>&1
|
2020-04-23 08:55:32 -05:00
|
|
|
loolwsd-generate-proof-key >/dev/null 2>&1
|
2019-11-26 15:56:58 -06:00
|
|
|
cat << EOF > /etc/apt/apt.conf.d/25loolwsd
|
2019-11-27 05:15:52 -06:00
|
|
|
// Rebuild systemplate of @APP_NAME@
|
2021-11-15 09:51:11 -06:00
|
|
|
DPkg::Post-Invoke { "echo Updating loolwsd systemplate;loolwsd-systemplate-setup /opt/cool/systemplate @LO_PATH@ >/dev/null 2>&1 || true"; };
|
2019-11-26 15:56:58 -06:00
|
|
|
EOF
|
2015-08-06 12:01:06 -05:00
|
|
|
;;
|
|
|
|
|
|
|
|
esac
|
|
|
|
|
2016-09-25 12:18:38 -05:00
|
|
|
#DEBHELPER#
|