diff --git a/src/onlyoffice/constants-service.conf b/src/onlyoffice/constants-service.conf new file mode 100644 index 0000000..07c2aa6 --- /dev/null +++ b/src/onlyoffice/constants-service.conf @@ -0,0 +1,23 @@ +#!/bin/bash + +# Authors: +# (C) 2021 Idea an concept by Christian Zengel +# (C) 2021 Script design and prototype by Markus Helmke +# (C) 2021 Script rework and documentation by Thorsten Spille + +# This file contains the project constants on service level + +# Create sharefs mountpoint +LXC_MP="0" + +# Create unprivileged container +LXC_UNPRIVILEGED="1" + +# enable nesting feature +LXC_NESTING="0" + +ONLYOFFICE_DB_HOST=localhost + +ONLYOFFICE_DB_NAME=onlyoffice + +ONLYOFFICE_DB_USER=onlyoffice \ No newline at end of file diff --git a/src/onlyoffice/install-service.sh b/src/onlyoffice/install-service.sh new file mode 100644 index 0000000..7e81b7b --- /dev/null +++ b/src/onlyoffice/install-service.sh @@ -0,0 +1,28 @@ +source /root/zamba.conf +source /root/constants-service.conf +ONLYOFFICE_DB_PASSWORD=$(source /root/postgresql.sh 13 $ONLYOFFICE_DB_NAME $ONLYOFFICE_DB_USER) +source /root/rabbitmq-server.sh + +apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys CB2DE8E5 +echo "deb https://download.onlyoffice.com/repo/debian squeeze main" > /etc/apt/sources.list.d/onlyoffice.list + +apt update + +echo onlyoffice-documentserver onlyoffice/ds-port select 80 | debconf-set-selections +echo onlyoffice-documentserver onlyoffice/db-host string $ONLYOFFICE_DB_HOST | sudo debconf-set-selections +echo onlyoffice-documentserver onlyoffice/db-user string $ONLYOFFICE_DB_NAME | sudo debconf-set-selections +echo onlyoffice-documentserver onlyoffice/db-name string $ONLYOFFICE_DB_USER | sudo debconf-set-selections +echo onlyoffice-documentserver onlyoffice/db-pwd password $ONLYOFFICE_DB_PASSWORD | debconf-set-selections + +DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt -y -qq install ttf-mscorefonts-installer onlyoffice-documentserver + +cat << EOF > /root/onlyoffice.credentials +ONLYOFFICE_DB_HOST=$ONLYOFFICE_DB_HOST +ONLYOFFICE_DB_NAME=$ONLYOFFICE_DB_NAME +ONLYOFFICE_DB_USER=$ONLYOFFICE_DB_USER +ONLYOFFICE_DB_PASSWORD=$ONLYOFFICE_DB_PASSWORD +EOF + +/etc/nginx/conf.d/ds.conf +cp /etc/onlyoffice/documentserver/nginx/ds-ssl.conf.tmpl /etc/onlyoffice/documentserver/nginx/ds-ssl.conf +ln -sf /etc/onlyoffice/documentserver/nginx/ds-ssl.conf /etc/nginx/conf.d/ds-ssl.conf