jimmydot | 8b8addd | 2017-05-08 18:00:46 -0400 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | FINAL_CONFIG_FILE=/tmp/vid/stage/WEB-INF/conf/asdc.properties |
| 4 | TEMPLATE_CONFIG_FILE=/tmp/vid/stage/WEB-INF/conf/asdc_template.properties |
| 5 | |
| 6 | echo "Localizing the ASDC client configuration" |
| 7 | |
| 8 | sed -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 | |
| 17 | echo "Localized ${FINAL_CONFIG_FILE} successfully." |