DocSpace-buildtools/build/install/deb/debian/postinst
Evgeniy Antonyuk 23436472ed
Add new services and rebranding in packages\scripts (#786)
* Add new services, delete old services and kafka

* Corrections to appserver-configuration script

* Download the get-php script depending on the version of py

* Add doceditor and migration-runner services

* Docspace rebranding

* Rename a spec file

* Update build.sh

* Fixes in proxy package

* Rename script

* Fix launch of node js services

* Edit connection strings in migration-runner service

* Fix minor errors

* Update docspace-configuration.sh

* Update docspace-configuration.sh

* Add configuration of redis and rabbitmq services, as well as minor bug fixes

* Correct redis configuration

* Rebrand and add new services for deb package

* Fix build directory for deb package

* Revert "Fix build directory for deb package"

This reverts commit 9c711fc735c57e154e6b818988384d4b7e60c338.

* Add postinst for radicale package

* Fix python dependency

* Fix errors in control file

* Fix errors when building a deb package

* Update rules

* Rebranding of installation scripts

* Update build.spec

* Add migration for Docs Database

Co-authored-by: Alexey Golubev <alexey.golubev@onlyoffice.com>
2022-09-01 21:10:34 +03:00

68 lines
1.9 KiB
Bash

#!/bin/sh -e
set -e
. /usr/share/debconf/confmodule
case "$1" in
configure)
db_get {{product}}/environment || true
ENVIRONMENT="$RET"
db_get {{product}}/host || true
APP_HOST="$RET"
db_get {{product}}/port || true
APP_PORT="$RET"
db_get {{product}}/db-host || true
DB_HOST="$RET"
db_get {{product}}/db-name || true
DB_NAME="$RET"
db_get {{product}}/db-user || true
DB_USER="$RET"
db_get {{product}}/db-pwd || true
DB_PWD="$RET"
db_get {{product}}/redis-host || true
REDIS_HOST="$RET"
db_get {{product}}/redis-port || true
REDIS_PORT="$RET"
db_get {{product}}/rabbitmq-host || true
RABBITMQ_HOST="$RET"
db_get {{product}}/rabbitmq-user || true
RABBITMQ_USER="$RET"
db_get {{product}}/rabbitmq-password || true
RABBITMQ_PASSWORD="$RET"
db_get {{product}}/elasticsearch-sheme || true
ELK_SHEME="$RET"
db_get {{product}}/elasticsearch-host || true
ELK_HOST="$RET"
db_get {{product}}/elasticsearch-port || true
ELK_PORT="$RET"
db_get onlyoffice/db-host || true
DOCUMENT_SERVER_HOST="$RET"
db_get onlyoffice/ds-port || true
DOCUMENT_SERVER_PORT="$RET"
bash /usr/bin/{{product}}-configuration.sh -e $ENVIRONMENT -mysqlh $DB_HOST -mysqld $DB_NAME -mysqlu $DB_USER -mysqlp $DB_PWD -ash $APP_HOST -asp $APP_PORT \
-dsh $DOCUMENT_SERVER_HOST -dsp $DOCUMENT_SERVER_PORT -rdh $REDIS_HOST -rdp $REDIS_PORT -rbh $RABBITMQ_HOST -rbu $RABBITMQ_USER -rbp $RABBITMQ_PASSWORD -ess $ELK_SHEME -esh $ELK_HOST -esp $ELK_PORT
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0