blob: b3442c8f26ce444a1d8e1dee06192628ef9d21a4 [file] [log] [blame]
jimmydot3982f4f2017-05-07 14:58:24 -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