blob: af483186f325a43e866c44a235e39a56722fdc59 [file] [log] [blame]
jimmydot8b8addd2017-05-08 18:00:46 -04001#!/bin/bash
2
kurczews7b8621d2018-09-19 08:17:52 +02003FINAL_CONFIG_FILE=$1/conf/asdc.properties
4TEMPLATE_CONFIG_FILE=$1/conf/asdc_template.properties
jimmydot8b8addd2017-05-08 18:00:46 -04005
6echo "Localizing the ASDC client configuration"
7
8sed -e 's ${ASDC_CLIENT_TYPE} '${ASDC_CLIENT_TYPE}' g' \
9 -e 's ${ASDC_CLIENT_REST_HOST} '${ASDC_CLIENT_REST_HOST}' g' \
10 -e 's ${ASDC_CLIENT_REST_PORT} '${ASDC_CLIENT_REST_PORT}' g' \
11 -e 's ${ASDC_CLIENT_REST_PROTOCOL} '${ASDC_CLIENT_REST_PROTOCOL}' g' \
12 -e 's/${ASDC_CLIENT_REST_AUTH}/'"${ASDC_CLIENT_REST_AUTH}"'/g' ${TEMPLATE_CONFIG_FILE} > ${FINAL_CONFIG_FILE} || {
13 echo "ERROR: Could not process template file ${TEMPLATE_CONFIG_FILE} into ${FINAL_CONFIG_FILE}"
14 exit 4
15 }
16
17echo "Localized ${FINAL_CONFIG_FILE} successfully."