blob: a7e6cd3bae093df31893b3007a5a4a34645aac33 [file] [log] [blame]
jimmydot8b8addd2017-05-08 18:00:46 -04001#!/bin/bash
2
kurczews7b8621d2018-09-19 08:17:52 +02003FINAL_CONFIG_FILE=$1/conf/system.properties
4TEMPLATE_CONFIG_FILE=$1/conf/system_template.properties
jimmydot8b8addd2017-05-08 18:00:46 -04005
6echo "Localizing the VID system configuration"
7
8mkdir -p "${VID_MYLOGIN_FEED_DIRECTORY}"
9
Amichai Hemlib8112692017-08-09 20:11:37 +030010
jimmydot8b8addd2017-05-08 18:00:46 -040011sed -e 's/${VID_MYSQL_HOST}/'${VID_MYSQL_HOST}'/g' \
12 -e 's/${VID_MYSQL_PORT}/'${VID_MYSQL_PORT}'/g' \
13 -e 's/${VID_MYSQL_DBNAME}/'${VID_MYSQL_DBNAME}'/g' \
14 -e 's/${VID_MYSQL_USER}/'${VID_MYSQL_USER}'/g' \
15 -e 's/${VID_MYSQL_PASS}/'${VID_MYSQL_PASS}'/g' \
biniek6d50f6a2018-11-05 15:21:51 +010016 -e 's ${VID_AAI_URL} '${VID_AAI_URL}' g' \
Amichai Hemlib8112692017-08-09 20:11:37 +030017 -e 's/${AAI_USE_CLIENT_CERT}/'${AAI_USE_CLIENT_CERT}'/g' \
18 -e 's/${AAI_VID_UID}/'${AAI_VID_UID}'/g' \
19 -e 's/${AAI_VID_PASSWD_X}/'${AAI_VID_PASSWD_X}'/g' \
jimmydot8b8addd2017-05-08 18:00:46 -040020 -e 's,${AAI_TRUSTSTORE_FILENAME},'${AAI_TRUSTSTORE_FILENAME}',g' \
21 -e 's/${AAI_TRUSTSTORE_PASSWD_X}/'${AAI_TRUSTSTORE_PASSWD_X}'/g' \
22 -e 's,${AAI_KEYSTORE_FILENAME},'${AAI_KEYSTORE_FILENAME}',g' \
23 -e 's/${AAI_KEYSTORE_PASSWD_X}/'${AAI_KEYSTORE_PASSWD_X}'/g' \
24 -e 's/${VID_APP_DISPLAY_NAME}/'${VID_APP_DISPLAY_NAME}'/g' \
25 -e 's ${VID_ECOMP_SHARED_CONTEXT_REST_URL} '${VID_ECOMP_SHARED_CONTEXT_REST_URL}' g' \
26 -e 's ${VID_ECOMP_REDIRECT_URL} '${VID_ECOMP_REDIRECT_URL}' g' \
27 -e 's ${VID_ECOMP_REST_URL} '${VID_ECOMP_REST_URL}' g' \
28 -e 's ${VID_MSO_SERVER_URL} '${VID_MSO_SERVER_URL}' g' \
29 -e 's/${VID_MSO_USER}/'${VID_MSO_USER}'/g' \
30 -e 's/${VID_MSO_PASS}/'${VID_MSO_PASS}'/g' \
31 -e 's,${VID_MYLOGIN_FEED_DIRECTORY},'${VID_MYLOGIN_FEED_DIRECTORY}',g' \
32 -e 's,${MSO_DME2_CLIENT_TIMEOUT},'${MSO_DME2_CLIENT_TIMEOUT}',g' \
33 -e 's,${MSO_DME2_CLIENT_READ_TIMEOUT},'${MSO_DME2_CLIENT_READ_TIMEOUT}',g' \
34 -e 's,${MSO_DME2_SERVER_URL},'${MSO_DME2_SERVER_URL}',g' \
35 -e 's,${MSO_DME2_ENABLED},'${MSO_DME2_ENABLED}',g' \
36 -e 's,${MSO_POLLING_INTERVAL_MSECS},'${MSO_POLLING_INTERVAL_MSECS}',g' \
Jakub Ziebab4aa71e2018-09-10 08:35:18 +020037 -e 's,${VID_TRUSTSTORE_FILE},'${VID_TRUSTSTORE_FILENAME}',g' \
38 -e 's/${VID_TRUSTSTORE_PASS}/'${VID_TRUSTSTORE_PASSWORD}'/g' ${TEMPLATE_CONFIG_FILE} > ${FINAL_CONFIG_FILE} || {
jimmydot8b8addd2017-05-08 18:00:46 -040039 echo "ERROR: Could not process template file ${TEMPLATE_CONFIG_FILE} into ${FINAL_CONFIG_FILE}"
40 exit 4
41 }
42
43echo "Localized ${FINAL_CONFIG_FILE} successfully."