3 fillTemplateProperties() {
4 source /tmp/vid/localize_war.sh $1 || {
5 echo "ERROR: Localization script failed"
10 createWritableLogbackConfig() {
11 # Create logback.xml in /tmp/vid/
12 # /tmp/logback.xml is owned by root and unmodifiable
13 cp -f /tmp/logback.xml /tmp/vid/logback.xml
16 if [ "${ON_KUBERNETES}" = "TRUE" ]
18 echo "We're running on Kubernetes, preconfiguration is already handled"
20 createWritableLogbackConfig
21 TEMPLATES_BASE_DIR=/usr/local/tomcat/webapps/vid/WEB-INF
22 fillTemplateProperties ${TEMPLATES_BASE_DIR}
25 # Set CATALINA_OPTS if not defined previously
26 # Enables late-evaluation of env variables, such as VID_KEYSTORE_PASSWORD
27 : "${CATALINA_OPTS:=-Dvid.keystore.password=${VID_KEYSTORE_PASSWORD} -Dvid.keyalias=vid@vid.onap.org -Dvid.keystore.filename=${VID_KEYSTORE_FILENAME} -Dcom.att.eelf.logging.file=logback.xml -Dcom.att.eelf.logging.path=/tmp/vid/}"
28 echo "CATALINA_OPTS: ${CATALINA_OPTS}"