DR695H | 13ce055 | 2017-02-07 13:11:03 -0500 | [diff] [blame^] | 1 | #!/bin/bash |
| 2 | |
| 3 | FINAL_CONFIG_FILE=/tmp/vid/stage/WEB-INF/conf/log4j.properties |
| 4 | TEMPLATE_CONFIG_FILE=/tmp/vid/stage/WEB-INF/conf/log4j_template.properties |
| 5 | |
| 6 | echo "Localizing the VID log4j configuration" |
| 7 | |
| 8 | mkdir -p ${LOG4J_LOGS_DIRECTORY} |
| 9 | |
| 10 | sed -e 's/${LOG4J_LOGLEVEL}/'${LOG4J_LOGLEVEL}'/g' \ |
| 11 | -e 's/${LOG4J_APPENDER}/'${LOG4J_APPENDER}'/g' \ |
| 12 | -e 's,${LOG4J_LOGS_DIRECTORY},'${LOG4J_LOGS_DIRECTORY}',g' ${TEMPLATE_CONFIG_FILE} > ${FINAL_CONFIG_FILE} || { |
| 13 | echo "ERROR: Could not process template file ${TEMPLATE_CONFIG_FILE} into ${FINAL_CONFIG_FILE}" |
| 14 | exit 3 |
| 15 | } |
| 16 | |
| 17 | echo "Localized ${FINAL_CONFIG_FILE} successfully." |
| 18 | |
| 19 | |