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/quartz.properties |
| 4 | TEMPLATE_CONFIG_FILE=/tmp/vid/stage/WEB-INF/conf/quartz_template.properties |
| 5 | |
| 6 | echo "Localizing the VID quartz configuration" |
| 7 | |
| 8 | sed -e 's/${VID_MYSQL_HOST}/'${VID_MYSQL_HOST}'/g' \ |
| 9 | -e 's/${VID_MYSQL_PORT}/'${VID_MYSQL_PORT}'/g' \ |
| 10 | -e 's/${VID_MYSQL_DBNAME}/'${VID_MYSQL_DBNAME}'/g' \ |
| 11 | -e 's/${VID_MYSQL_USER}/'${VID_MYSQL_USER}'/g' \ |
| 12 | -e 's/${VID_MYSQL_PASS}/'${VID_MYSQL_PASS}'/g' \ |
| 13 | -e 's/${VID_MYSQL_MAXCONNECTIONS}/'${VID_MYSQL_MAXCONNECTIONS}'/g' ${TEMPLATE_CONFIG_FILE} > ${FINAL_CONFIG_FILE} || { |
| 14 | echo "ERROR: Could not process template file ${TEMPLATE_CONFIG_FILE} into ${FINAL_CONFIG_FILE}" |
| 15 | exit 4 |
| 16 | } |
| 17 | |
| 18 | echo "Localized ${FINAL_CONFIG_FILE} successfully." |
| 19 | |
| 20 | |