Evgeniy Antonyuk
69a6ed4d46
* Add templates * Add a launch of the configuration script to the postinst * Edit OneClickInstall for new changes * Correct appserver-configuration.sh * chown fix * Correction debconf-set-selections * Fix the launch of services after installation * test * Correction for database values * Add variables for mysql configuration * Revert "test" This reverts commit 85e5050eb2cfeb1b3723076e44ec0819e0889142. * Add launch of zookeeper and kafka services
66 lines
1.8 KiB
Bash
66 lines
1.8 KiB
Bash
#!/bin/sh -e
|
|
|
|
set -e
|
|
|
|
. /usr/share/debconf/confmodule
|
|
|
|
case "$1" in
|
|
configure)
|
|
db_get appserver/environment || true
|
|
ENVIRONMENT="$RET"
|
|
db_get appserver/host || true
|
|
APP_HOST="$RET"
|
|
db_get appserver/port || true
|
|
APP_PORT="$RET"
|
|
|
|
db_get appserver/db-host || true
|
|
DB_HOST="$RET"
|
|
db_get appserver/db-name || true
|
|
DB_NAME="$RET"
|
|
db_get appserver/db-user || true
|
|
DB_USER="$RET"
|
|
db_get appserver/db-pwd || true
|
|
DB_PWD="$RET"
|
|
|
|
db_get appserver/kafka-host || true
|
|
KAFKA_HOST="$RET"
|
|
db_get appserver/kafka-port || true
|
|
KAFKA_PORT="$RET"
|
|
|
|
db_get appserver/zookeeper-host || true
|
|
ZOOKEEPER_HOST="$RET"
|
|
db_get appserver/zookeeper-port || true
|
|
ZOOKEEPER_PORT="$RET"
|
|
|
|
db_get appserver/elasticsearch-sheme || true
|
|
ELK_SHEME="$RET"
|
|
db_get appserver/elasticsearch-host || true
|
|
ELK_HOST="$RET"
|
|
db_get appserver/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/appserver-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 -kh $KAFKA_HOST -kp $KAFKA_PORT -zkh $ZOOKEEPER_HOST -zkp $ZOOKEEPER_PORT -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
|