jimmydot | 8b8addd | 2017-05-08 18:00:46 -0400 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
kurczews | 7b8621d | 2018-09-19 08:17:52 +0200 | [diff] [blame] | 3 | FINAL_CONFIG_FILE=$1/conf/asdc.properties |
| 4 | TEMPLATE_CONFIG_FILE=$1/conf/asdc_template.properties |
jimmydot | 8b8addd | 2017-05-08 18:00:46 -0400 | [diff] [blame] | 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." |