blob: d2ab2bba4884004b936c169456d63a04cb9ede74 [file] [log] [blame]
jimmydot8b8addd2017-05-08 18:00:46 -04001#!/bin/bash
2
3FINAL_CONFIG_FILE=/tmp/vid/stage/WEB-INF/conf/log4j.properties
4TEMPLATE_CONFIG_FILE=/tmp/vid/stage/WEB-INF/conf/log4j_template.properties
5
6echo "Localizing the VID log4j configuration"
7
8mkdir -p ${LOG4J_LOGS_DIRECTORY}
9
10sed -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
17echo "Localized ${FINAL_CONFIG_FILE} successfully."
18
19