blob: 549c17af1736efe1ea3a61cd8a3d383a15072113 [file] [log] [blame]
jimmydot8b8addd2017-05-08 18:00:46 -04001#!/bin/bash
2
3FINAL_CONFIG_FILE=/tmp/vid/stage/WEB-INF/conf/asdc.properties
4TEMPLATE_CONFIG_FILE=/tmp/vid/stage/WEB-INF/conf/asdc_template.properties
5
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."