diff options
author | Ofir Sonsino <os0695@att.com> | 2018-01-31 17:19:00 +0200 |
---|---|---|
committer | Ofir Sonsino <os0695@att.com> | 2018-01-31 17:19:00 +0200 |
commit | 1cfb08779ea0e00be69e072a940b3063e049fe6b (patch) | |
tree | 6602a900387c8393ed0dcd81c0539381632903c6 /epsdk-app-onap/src/main/swm/common | |
parent | 2f20b001b9243e0f8b44aecc768ec265fd538732 (diff) |
org.onap migration
Change-Id: I52f0b2851f2c765752b6d21f49b32136d7d72a3d
Issue-ID: VID-86
Signed-off-by: Ofir Sonsino <os0695@att.com>
Diffstat (limited to 'epsdk-app-onap/src/main/swm/common')
-rwxr-xr-x | epsdk-app-onap/src/main/swm/common/common.sh | 35 | ||||
-rwxr-xr-x | epsdk-app-onap/src/main/swm/common/localize.sh | 33 | ||||
-rwxr-xr-x | epsdk-app-onap/src/main/swm/common/localize_asdc.sh | 68 | ||||
-rwxr-xr-x | epsdk-app-onap/src/main/swm/common/localize_cache.sh | 41 | ||||
-rwxr-xr-x | epsdk-app-onap/src/main/swm/common/localize_log4j.sh | 54 | ||||
-rwxr-xr-x | epsdk-app-onap/src/main/swm/common/localize_logback.sh | 46 | ||||
-rwxr-xr-x | epsdk-app-onap/src/main/swm/common/localize_portal.sh | 84 | ||||
-rwxr-xr-x | epsdk-app-onap/src/main/swm/common/localize_quartz.sh | 67 | ||||
-rwxr-xr-x | epsdk-app-onap/src/main/swm/common/localize_system.sh | 178 |
9 files changed, 0 insertions, 606 deletions
diff --git a/epsdk-app-onap/src/main/swm/common/common.sh b/epsdk-app-onap/src/main/swm/common/common.sh deleted file mode 100755 index 4b98a5eac..000000000 --- a/epsdk-app-onap/src/main/swm/common/common.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash
-
-if [[ "${INSTALL_ROOT}" = */ ]]; then
- export ROOT_DIR=${INSTALL_ROOT}opt/app/vid/portal
-else
- export ROOT_DIR=${INSTALL_ROOT}/opt/app/vid/portal
-fi
-
-export JAVA_HOME=/opt/app/java/jdk/jdk180
-
-
-OS=`uname`
-
-if [ "${OS}" = "SunOS" ]; then
- CURRENT_USER=`/usr/xpg4/bin/id -un`
- CURRENT_GROUP=`/usr/xpg4/bin/id -gn`
-else
- CURRENT_USER=`id -un`
- CURRENT_GROUP=`id -gn`
-fi
-
-export CURRENT_USER CURRENT_GROUP
-export TOMCAT_HOME=/opt/app/vid/tomcat
-
-if [ -z "${VID_ENDPOINT_NAME}" ]; then
- VID_ENDPOINT_NAME="vid"
-fi
-
-# Fail - used to quickly exit with a rc and error message
-fail() {
- rc=$1
- shift;
- echo "ERROR: $@"
- exit $rc
-}
diff --git a/epsdk-app-onap/src/main/swm/common/localize.sh b/epsdk-app-onap/src/main/swm/common/localize.sh deleted file mode 100755 index 711287e1f..000000000 --- a/epsdk-app-onap/src/main/swm/common/localize.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash
-
-COMMON_DIR="$(dirname "$AFTSWM_ACTIONHANDLER_SCRIPT")/../../common"
-
-source "${COMMON_DIR}/localize_logback.sh" || {
- echo "ERROR: Localizing logback.xml failed"
- exit 1
-}
-
-source "${COMMON_DIR}/localize_portal.sh" || {
- echo "ERROR: Localizing portal.properties failed"
- exit 1
-}
-
-source "${COMMON_DIR}/localize_quartz.sh" || {
- echo "ERROR: Localizing quartz.properties failed"
- exit 1
-}
-
-source "${COMMON_DIR}/localize_system.sh" || {
- echo "ERROR: Localizing system.properties failed"
- exit 1
-}
-
-source "${COMMON_DIR}/localize_cache.sh" || {
- echo "ERROR: Localizing cache.ccf failed"
- exit 1
-}
-
-source "${COMMON_DIR}/localize_asdc.sh" || {
- echo "ERROR: Localizing asdc.properties failed"
- exit 1
-}
diff --git a/epsdk-app-onap/src/main/swm/common/localize_asdc.sh b/epsdk-app-onap/src/main/swm/common/localize_asdc.sh deleted file mode 100755 index 5774e5a0c..000000000 --- a/epsdk-app-onap/src/main/swm/common/localize_asdc.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/bash
-
-FINAL_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/conf/asdc.properties
-TEMPLATE_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/conf/asdc_template.properties
-BACKUP1_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/conf/asdc.properties.bk.1
-BACKUP2_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/conf/asdc.properties.bk.2
-
-echo "Localizing the SDC client configuration"
-
-if [ -z "${ASDC_CLIENT_TYPE}" ]; then
- ASDC_CLIENT_TYPE=REST
-fi
-
-if [ "${ASDC_CLIENT_TYPE}" = "REST" ]; then
- if [ -z "${ASDC_CLIENT_REST_HOST}" ]; then
- echo 'ASDC_CLIENT_REST_HOST must be provided when ASDC_CLIENT_TYPE=REST'
- exit 1
- fi
-
- if [ -z "${ASDC_CLIENT_REST_AUTH}" ]; then
- echo 'ASDC_CLIENT_REST_AUTH must be provided when ASDC_CLIENT_TYPE=REST'
- exit 2
- fi
-
- if [ -z "${ASDC_CLIENT_REST_PROTOCOL}" ]; then
- ASDC_CLIENT_REST_PROTOCOL=http
- fi
-
- if [ -z "${ASDC_CLIENT_REST_PORT}" ]; then
- ASDC_CLIENT_REST_PORT=8080
- fi
-else
- ASDC_CLIENT_REST_HOST=""
- ASDC_CLIENT_REST_AUTH=""
- ASDC_CLIENT_REST_PROTOCOL="http"
- ASDC_CLIENT_REST_PORT="8080"
-fi
-
-#------------------------------------------------------------------------
-#- MAKE A BACKUP OF PREVIOUS BACKUP FILE, IF EXISTS
-#------------------------------------------------------------------------
-if [ -f ${BACKUP1_CONFIG_FILE} ]; then
- cp -f ${BACKUP1_CONFIG_FILE} ${BACKUP2_CONFIG_FILE} || {
- echo "ERROR: Could not copy ${BACKUP1_CONFIG_FILE} to ${BACKUP2_CONFIG_FILE}"
- exit 2
- }
-fi
-
-#------------------------------------------------------------------------
-#- MAKE A BACKUP OF CURRENT FILE, IF EXISTS
-#------------------------------------------------------------------------
-if [ -f ${FINAL_CONFIG_FILE} ]; then
- cp -f ${FINAL_CONFIG_FILE} ${BACKUP1_CONFIG_FILE} || {
- echo "ERROR: Could not copy ${FINAL_CONFIG_FILE} to ${BACKUP1_CONFIG_FILE}"
- exit 3
- }
-fi
-
-sed -e 's ${ASDC_CLIENT_TYPE} '${ASDC_CLIENT_TYPE}' g' \
- -e 's ${ASDC_CLIENT_REST_HOST} '${ASDC_CLIENT_REST_HOST}' g' \
- -e 's ${ASDC_CLIENT_REST_PORT} '${ASDC_CLIENT_REST_PORT}' g' \
- -e 's ${ASDC_CLIENT_REST_PROTOCOL} '${ASDC_CLIENT_REST_PROTOCOL}' g' \
- -e 's/${ASDC_CLIENT_REST_AUTH}/'"${ASDC_CLIENT_REST_AUTH}"'/g' ${TEMPLATE_CONFIG_FILE} > ${FINAL_CONFIG_FILE} || {
- echo "ERROR: Could not process template file ${TEMPLATE_CONFIG_FILE} into ${FINAL_CONFIG_FILE}"
- exit 4
- }
-
-echo "Localized ${FINAL_CONFIG_FILE} successfully."
diff --git a/epsdk-app-onap/src/main/swm/common/localize_cache.sh b/epsdk-app-onap/src/main/swm/common/localize_cache.sh deleted file mode 100755 index 00069f89f..000000000 --- a/epsdk-app-onap/src/main/swm/common/localize_cache.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash
-
-FINAL_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/classes/cache.ccf
-TEMPLATE_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/classes/cache_template.ccf
-BACKUP1_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/classes/cache.ccf.bk.1
-BACKUP2_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/classes/cache.ccf.bk.2
-
-echo "Localizing the VID cache configuration"
-
-if [ -z "${CACHE_DIRECTORY}" ]; then
- CACHE_DIRECTORY=${ROOT_DIR}/cache
-fi
-
-mkdir -p "${CACHE_DIRECTORY}"
-
-#------------------------------------------------------------------------
-#- MAKE A BACKUP OF PREVIOUS BACKUP FILE, IF EXISTS
-#------------------------------------------------------------------------
-if [ -f ${BACKUP1_CONFIG_FILE} ]; then
- cp -f ${BACKUP1_CONFIG_FILE} ${BACKUP2_CONFIG_FILE} || {
- echo "ERROR: Could not copy ${BACKUP1_CONFIG_FILE} to ${BACKUP2_CONFIG_FILE}"
- exit 1
- }
-fi
-
-#------------------------------------------------------------------------
-#- MAKE A BACKUP OF CURRENT FILE, IF EXISTS
-#------------------------------------------------------------------------
-if [ -f ${FINAL_CONFIG_FILE} ]; then
- cp -f ${FINAL_CONFIG_FILE} ${BACKUP1_CONFIG_FILE} || {
- echo "ERROR: Could not copy ${FINAL_CONFIG_FILE} to ${BACKUP1_CONFIG_FILE}"
- exit 2
- }
-fi
-
-sed -e 's,${CACHE_DIRECTORY},'${CACHE_DIRECTORY}',g' ${TEMPLATE_CONFIG_FILE} > ${FINAL_CONFIG_FILE} || {
- echo "ERROR: Could not process template file ${TEMPLATE_CONFIG_FILE} into ${FINAL_CONFIG_FILE}"
- exit 3
- }
-
-echo "Localized ${FINAL_CONFIG_FILE} successfully."
diff --git a/epsdk-app-onap/src/main/swm/common/localize_log4j.sh b/epsdk-app-onap/src/main/swm/common/localize_log4j.sh deleted file mode 100755 index 1b044aa6b..000000000 --- a/epsdk-app-onap/src/main/swm/common/localize_log4j.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/bash
-
-FINAL_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/conf/log4j.properties
-TEMPLATE_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/conf/log4j_template.properties
-BACKUP1_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/conf/log4j.properties.bk.1
-BACKUP2_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/conf/log4j.properties.bk.2
-
-echo "Localizing the VID log4j configuration"
-
-if [ -z "${LOG4J_LOGLEVEL}" ]; then
- LOG4J_LOGLEVEL=INFO
-fi
-
-
-if [ -z "${LOG4J_APPENDER}" ]; then
- LOG4J_APPENDER=rollingfile
-fi
-
-if [ -z "${LOG4J_LOGS_DIRECTORY}" ]; then
- LOG4J_LOGS_DIRECTORY=${ROOT_DIR}/logs
-fi
-
-mkdir -p ${LOG4J_LOGS_DIRECTORY}
-
-#------------------------------------------------------------------------
-#- MAKE A BACKUP OF PREVIOUS BACKUP FILE, IF EXISTS
-#------------------------------------------------------------------------
-if [ -f ${BACKUP1_CONFIG_FILE} ]; then
- cp -f ${BACKUP1_CONFIG_FILE} ${BACKUP2_CONFIG_FILE} || {
- echo "ERROR: Could not copy ${BACKUP1_CONFIG_FILE} to ${BACKUP2_CONFIG_FILE}"
- exit 1
- }
-fi
-
-#------------------------------------------------------------------------
-#- MAKE A BACKUP OF CURRENT FILE, IF EXISTS
-#------------------------------------------------------------------------
-if [ -f ${FINAL_CONFIG_FILE} ]; then
- cp -f ${FINAL_CONFIG_FILE} ${BACKUP1_CONFIG_FILE} || {
- echo "ERROR: Could not copy ${FINAL_CONFIG_FILE} to ${BACKUP1_CONFIG_FILE}"
- exit 2
- }
-fi
-
-sed -e 's/${LOG4J_LOGLEVEL}/'${LOG4J_LOGLEVEL}'/g' \
- -e 's/${LOG4J_APPENDER}/'${LOG4J_APPENDER}'/g' \
- -e 's,${LOG4J_LOGS_DIRECTORY},'${LOG4J_LOGS_DIRECTORY}',g' ${TEMPLATE_CONFIG_FILE} > ${FINAL_CONFIG_FILE} || {
- echo "ERROR: Could not process template file ${TEMPLATE_CONFIG_FILE} into ${FINAL_CONFIG_FILE}"
- exit 3
- }
-
-echo "Localized ${FINAL_CONFIG_FILE} successfully."
-
-
diff --git a/epsdk-app-onap/src/main/swm/common/localize_logback.sh b/epsdk-app-onap/src/main/swm/common/localize_logback.sh deleted file mode 100755 index bda2486d4..000000000 --- a/epsdk-app-onap/src/main/swm/common/localize_logback.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash
-
-FINAL_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/classes/logback.xml
-TEMPLATE_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/classes/logback_template.xml
-BACKUP1_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/classes/logback.xml.bk.1
-BACKUP2_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/classes/logback.xml.bk.2
-
-echo "Localizing the VID logback configuration"
-
-if [ -z "${VID_LOG_DIR}" ]; then
- VID_LOG_DIR="${ROOT_DIR}/logs"
-fi
-
-if [ -z "${VID_LOG_LEVEL}" ]; then
- VID_LOG_LEVEL="INFO"
-fi
-
-mkdir -p "${VID_LOG_DIR}"
-
-#------------------------------------------------------------------------
-#- MAKE A BACKUP OF PREVIOUS BACKUP FILE, IF EXISTS
-#------------------------------------------------------------------------
-if [ -f ${BACKUP1_CONFIG_FILE} ]; then
- cp -f ${BACKUP1_CONFIG_FILE} ${BACKUP2_CONFIG_FILE} || {
- echo "ERROR: Could not copy ${BACKUP1_CONFIG_FILE} to ${BACKUP2_CONFIG_FILE}"
- exit 1
- }
-fi
-
-#------------------------------------------------------------------------
-#- MAKE A BACKUP OF CURRENT FILE, IF EXISTS
-#------------------------------------------------------------------------
-if [ -f ${FINAL_CONFIG_FILE} ]; then
- cp -f ${FINAL_CONFIG_FILE} ${BACKUP1_CONFIG_FILE} || {
- echo "ERROR: Could not copy ${FINAL_CONFIG_FILE} to ${BACKUP1_CONFIG_FILE}"
- exit 2
- }
-fi
-
-sed -e 's/${VID_LOG_LEVEL}/'${VID_LOG_LEVEL}'/g' \
- -e 's,${VID_LOG_DIR},'${VID_LOG_DIR}',g' ${TEMPLATE_CONFIG_FILE} > ${FINAL_CONFIG_FILE} || {
- echo "ERROR: Could not process template file ${TEMPLATE_CONFIG_FILE} into ${FINAL_CONFIG_FILE}"
- exit 3
- }
-
-echo "Localized ${FINAL_CONFIG_FILE} successfully."
diff --git a/epsdk-app-onap/src/main/swm/common/localize_portal.sh b/epsdk-app-onap/src/main/swm/common/localize_portal.sh deleted file mode 100755 index 27ea24a11..000000000 --- a/epsdk-app-onap/src/main/swm/common/localize_portal.sh +++ /dev/null @@ -1,84 +0,0 @@ -#!/bin/bash
-
-FINAL_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/classes/portal.properties
-TEMPLATE_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/classes/portal_template.properties
-BACKUP1_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/classes/portal.properties.bk.1
-BACKUP2_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/classes/portal.properties.bk.2
-
-echo "Localizing the VID portal configuration"
-
-if [ -z "${VID_ECOMP_REDIRECT_URL}" ]; then
- VID_ECOMP_REDIRECT_URL=http://portal.api.simpledemo.onap.org:8989/ONAPPORTAL/login.htm
-fi
-
-if [ -z "${VID_WJ_LOGOUT_URL}" ]; then
- VID_WJ_LOGOUT_URL=https://portal.openecomp.org/ecompportal/ecompportal/process_csp
-fi
-
-if [ -z "${VID_ECOMP_REST_URL}" ]; then
- VID_ECOMP_REST_URL=http://portal.api.simpledemo.onap.org:8989/ONAPPORTAL/auxapi
-fi
-
-if [ -z "${VID_UEB_URL_LIST}" ]; then
- VID_UEB_URL_LIST=ueb.openecomp.org
-fi
-
-if [ -z "${VID_UEB_CONSUMER_GROUP}" ]; then
- VID_UEB_CONSUMER_GROUP=VID
-fi
-
-if [ -z "${VID_ECOMP_PORTAL_INBOX_NAME}" ]; then
- VID_ECOMP_PORTAL_INBOX_NAME=ECOMP-PORTAL-INBOX-DEV-LOCAL
-fi
-
-if [ -z "${VID_UEB_APP_KEY}" ]; then
- VID_UEB_APP_KEY=sYH0NJnsKmJC1B2A
-fi
-
-if [ -z "${VID_UEB_APP_SECRET}" ]; then
- VID_UEB_APP_SECRET=YOtknsT2wVFz9WISlSPDaAtd
-fi
-
-if [ -z "${VID_UEB_APP_MAILBOX_NAME}" ]; then
- VID_UEB_APP_MAILBOX_NAME="ECOMP-PORTAL-OUTBOX-90"
-fi
-
-if [ -z "${VID_UEB_LISTENERS_ENABLE}" ]; then
- VID_UEB_LISTENERS_ENABLE="false"
-fi
-
-#------------------------------------------------------------------------
-#- MAKE A BACKUP OF PREVIOUS BACKUP FILE, IF EXISTS
-#------------------------------------------------------------------------
-if [ -f ${BACKUP1_CONFIG_FILE} ]; then
- cp -f ${BACKUP1_CONFIG_FILE} ${BACKUP2_CONFIG_FILE} || {
- echo "ERROR: Could not copy ${BACKUP1_CONFIG_FILE} to ${BACKUP2_CONFIG_FILE}"
- exit 2
- }
-fi
-
-#------------------------------------------------------------------------
-#- MAKE A BACKUP OF CURRENT FILE, IF EXISTS
-#------------------------------------------------------------------------
-if [ -f ${FINAL_CONFIG_FILE} ]; then
- cp -f ${FINAL_CONFIG_FILE} ${BACKUP1_CONFIG_FILE} || {
- echo "ERROR: Could not copy ${FINAL_CONFIG_FILE} to ${BACKUP1_CONFIG_FILE}"
- exit 3
- }
-fi
-
-sed -e 's ${VID_WJ_LOGOUT_URL} '${VID_WJ_LOGOUT_URL}' g' \
- -e 's ${VID_ECOMP_REDIRECT_URL} '${VID_ECOMP_REDIRECT_URL}' g' \
- -e 's ${VID_ECOMP_REST_URL} '${VID_ECOMP_REST_URL}' g' \
- -e 's ${VID_UEB_URL_LIST} '${VID_UEB_URL_LIST}' g' \
- -e 's ${VID_ECOMP_PORTAL_INBOX_NAME} '${VID_ECOMP_PORTAL_INBOX_NAME}' g' \
- -e 's ${VID_UEB_APP_KEY} '${VID_UEB_APP_KEY}' g' \
- -e 's ${VID_UEB_APP_SECRET} '${VID_UEB_APP_SECRET}' g' \
- -e 's ${VID_UEB_APP_MAILBOX_NAME} '${VID_UEB_APP_MAILBOX_NAME}' g' \
- -e 's ${VID_UEB_LISTENERS_ENABLE} '${VID_UEB_LISTENERS_ENABLE}' g' \
- -e 's/${VID_UEB_CONSUMER_GROUP}/'${VID_UEB_CONSUMER_GROUP}'/g' ${TEMPLATE_CONFIG_FILE} > ${FINAL_CONFIG_FILE} || {
- echo "ERROR: Could not process template file ${TEMPLATE_CONFIG_FILE} into ${FINAL_CONFIG_FILE}"
- exit 4
- }
-
-echo "Localized ${FINAL_CONFIG_FILE} successfully."
diff --git a/epsdk-app-onap/src/main/swm/common/localize_quartz.sh b/epsdk-app-onap/src/main/swm/common/localize_quartz.sh deleted file mode 100755 index 9a646867c..000000000 --- a/epsdk-app-onap/src/main/swm/common/localize_quartz.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/bash
-
-FINAL_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/conf/quartz.properties
-TEMPLATE_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/conf/quartz_template.properties
-BACKUP1_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/conf/quartz.properties.bk.1
-BACKUP2_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/conf/quartz.properties.bk.2
-
-echo "Localizing the VID quartz configuration"
-
-if [ -z "${VID_MYSQL_HOST}" ]; then
- VID_MYSQL_HOST=localhost
-fi
-
-if [ -z "${VID_MYSQL_PORT}" ]; then
- VID_MYSQL_PORT=3306
-fi
-
-if [ -z "${VID_MYSQL_DBNAME}" ]; then
- VID_MYSQL_DBNAME=vid_portal
-fi
-
-if [ -z "${VID_MYSQL_USER}" ]; then
- VID_MYSQL_USER=$(id -un)
-fi
-
-if [ -z "${VID_MYSQL_MAXCONNECTIONS}" ]; then
- VID_MYSQL_MAXCONNECTIONS=5
-fi
-
-if [ -z "${VID_MYSQL_PASS}" ]; then
- echo "Missing required parameter VID_MYSQL_PASS"
- exit 1
-fi
-
-#------------------------------------------------------------------------
-#- MAKE A BACKUP OF PREVIOUS BACKUP FILE, IF EXISTS
-#------------------------------------------------------------------------
-if [ -f ${BACKUP1_CONFIG_FILE} ]; then
- cp -f ${BACKUP1_CONFIG_FILE} ${BACKUP2_CONFIG_FILE} || {
- echo "ERROR: Could not copy ${BACKUP1_CONFIG_FILE} to ${BACKUP2_CONFIG_FILE}"
- exit 2
- }
-fi
-
-#------------------------------------------------------------------------
-#- MAKE A BACKUP OF CURRENT FILE, IF EXISTS
-#------------------------------------------------------------------------
-if [ -f ${FINAL_CONFIG_FILE} ]; then
- cp -f ${FINAL_CONFIG_FILE} ${BACKUP1_CONFIG_FILE} || {
- echo "ERROR: Could not copy ${FINAL_CONFIG_FILE} to ${BACKUP1_CONFIG_FILE}"
- exit 3
- }
-fi
-
-sed -e 's/${VID_MYSQL_HOST}/'${VID_MYSQL_HOST}'/g' \
- -e 's/${VID_MYSQL_PORT}/'${VID_MYSQL_PORT}'/g' \
- -e 's/${VID_MYSQL_DBNAME}/'${VID_MYSQL_DBNAME}'/g' \
- -e 's/${VID_MYSQL_USER}/'${VID_MYSQL_USER}'/g' \
- -e 's/${VID_MYSQL_PASS}/'${VID_MYSQL_PASS}'/g' \
- -e 's/${VID_MYSQL_MAXCONNECTIONS}/'${VID_MYSQL_MAXCONNECTIONS}'/g' ${TEMPLATE_CONFIG_FILE} > ${FINAL_CONFIG_FILE} || {
- echo "ERROR: Could not process template file ${TEMPLATE_CONFIG_FILE} into ${FINAL_CONFIG_FILE}"
- exit 4
- }
-
-echo "Localized ${FINAL_CONFIG_FILE} successfully."
-
-
diff --git a/epsdk-app-onap/src/main/swm/common/localize_system.sh b/epsdk-app-onap/src/main/swm/common/localize_system.sh deleted file mode 100755 index c9d0afd8d..000000000 --- a/epsdk-app-onap/src/main/swm/common/localize_system.sh +++ /dev/null @@ -1,178 +0,0 @@ -#!/bin/bash
-
-FINAL_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/conf/system.properties
-TEMPLATE_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/conf/system_template.properties
-BACKUP1_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/conf/system.properties.bk.1
-BACKUP2_CONFIG_FILE=${ROOT_DIR}/war/WEB-INF/conf/system.properties.bk.2
-
-echo "Localizing the VID system configuration"
-
-if [ -z "${VID_MYSQL_HOST}" ]; then
- VID_MYSQL_HOST=localhost
-fi
-
-if [ -z "${VID_MYSQL_PORT}" ]; then
- VID_MYSQL_PORT=3306
-fi
-
-if [ -z "${VID_MYSQL_DBNAME}" ]; then
- VID_MYSQL_DBNAME=vid_portal
-fi
-
-if [ -z "${VID_MYSQL_USER}" ]; then
- VID_MYSQL_USER=vid_admin
-fi
-
-if [ -z "${VID_MYSQL_MAXCONNECTIONS}" ]; then
- VID_MYSQL_MAXCONNECTIONS=5
-fi
-
-if [ -z "${VID_AAI_HOST}" ]; then
- VID_AAI_HOST=aai.api.openecomp.org
-fi
-
-if [ -z "${VID_AAI_PORT}" ]; then
- VID_AAI_PORT=8443
-fi
-
-if [ -z "${VID_APP_DISPLAY_NAME}" ]; then
- VID_APP_DISPLAY_NAME=VID
-fi
-
-if [ -z "${VID_ECOMP_SHARED_CONTEXT_REST_URL}" ]; then
- VID_ECOMP_SHARED_CONTEXT_REST_URL="https://portal.openecomp.org:8080/ecompportal/context"
-fi
-
-if [ -z "${VID_ECOMP_REDIRECT_URL}" ]; then
- VID_ECOMP_REDIRECT_URL=http://portal.api.simpledemo.onap.org:8989/ONAPPORTAL/login.htm
-fi
-
-if [ -z "${VID_ECOMP_REST_URL}" ]; then
- VID_ECOMP_REST_URL=http://portal.api.simpledemo.onap.org:8989/ONAPPORTAL/auxapi
-fi
-
-if [ -z "${VID_MSO_SERVER_URL}" ]; then
- VID_MSO_SERVER_URL=https://mso.api.openecomp.org:8443
-fi
-
-if [ -z "${VID_TRUSTSTORE_FILE}" ]; then
- VID_TRUSTSTORE_FILE=${ROOT_DIR}/etc/vid_keystore.jks
-fi
-
-if [ -z "${VID_MYLOGIN_FEED_DIRECTORY}" ]; then
- VID_MYLOGIN_FEED_DIRECTORY=/tmp/MyLogins
-fi
-
-if [ -z "${VID_TRUSTSTORE_PASS}" ]; then
- echo "ERROR: Missing required parameter VID_TRUSTSTORE_PASS"
- exit 1
-fi
-
-if [ -z "${VID_MSO_USER}" ]; then
- echo "ERROR: Missing required parameter VID_MSO_USER"
- exit 1
-fi
-
-if [ -z "${VID_MSO_PASS}" ]; then
- echo "ERROR: Missing required parameter VID_MSO_PASS";
- exit 1
-fi
-
-if [ -z "${VID_MYSQL_PASS}" ]; then
- echo "ERROR: Missing required parameter VID_MYSQL_PASS"
- exit 1
-fi
-
-if [ -z "${MSO_DME2_CLIENT_TIMEOUT}" ]; then
- echo "ERROR: Missing required parameter MSO_DME2_CLIENT_TIMEOUT"
- exit 1
-fi
-
-if [ -z "${MSO_DME2_CLIENT_READ_TIMEOUT}" ]; then
- echo "ERROR: Missing required parameter MSO_DME2_CLIENT_READ_TIMEOUT"
- exit 1
-fi
-
-if [ -z "${MSO_DME2_SERVER_URL}" ]; then
- echo "ERROR: Missing required parameter MSO_DME2_SERVER_URL"
- exit 1
-fi
-if [ -z "${MSO_DME2_ENABLED}" ]; then
- echo "ERROR: Missing required parameter MSO_DME2_ENABLED"
- exit 1
-fi
-if [ -z "${MSO_POLLING_INTERVAL_MSECS}" ]; then
- MSO_POLLING_INTERVAL_MSECS=10000
-fi
-
-if [ -z "${AAI_TRUSTSTORE_FILENAME}" ]; then
- AAI_TRUSTSTORE_FILENAME=tomcat_keystore
-fi
-
-if [ -z "${AAI_TRUSTSTORE_PASSWD_X}" ]; then
- AAI_TRUSTSTORE_PASSWD_X=70c87528c88dcd9f9c2558d30e817868
-fi
-
-if [ -z "${AAI_KEYSTORE_FILENAME}" ]; then
- AAI_KEYSTORE_FILENAME=aai-client-cert.p12
-fi
-
-if [ -z "${AAI_KEYSTORE_PASSWD_X}" ]; then
- AAI_KEYSTORE_PASSWD_X=70c87528c88dcd9f9c2558d30e817868
-fi
-
-mkdir -p "${VID_MYLOGIN_FEED_DIRECTORY}"
-
-#------------------------------------------------------------------------
-#- MAKE A BACKUP OF PREVIOUS BACKUP FILE, IF EXISTS
-#------------------------------------------------------------------------
-if [ -f ${BACKUP1_CONFIG_FILE} ]; then
- cp -f ${BACKUP1_CONFIG_FILE} ${BACKUP2_CONFIG_FILE} || {
- echo "ERROR: Could not copy ${BACKUP1_CONFIG_FILE} to ${BACKUP2_CONFIG_FILE}"
- exit 2
- }
-fi
-
-#------------------------------------------------------------------------
-#- MAKE A BACKUP OF CURRENT FILE, IF EXISTS
-#------------------------------------------------------------------------
-if [ -f ${FINAL_CONFIG_FILE} ]; then
- cp -f ${FINAL_CONFIG_FILE} ${BACKUP1_CONFIG_FILE} || {
- echo "ERROR: Could not copy ${FINAL_CONFIG_FILE} to ${BACKUP1_CONFIG_FILE}"
- exit 3
- }
-fi
-
-sed -e 's/${VID_MYSQL_HOST}/'${VID_MYSQL_HOST}'/g' \
- -e 's/${VID_MYSQL_PORT}/'${VID_MYSQL_PORT}'/g' \
- -e 's/${VID_MYSQL_DBNAME}/'${VID_MYSQL_DBNAME}'/g' \
- -e 's/${VID_MYSQL_USER}/'${VID_MYSQL_USER}'/g' \
- -e 's/${VID_MYSQL_PASS}/'${VID_MYSQL_PASS}'/g' \
- -e 's/${VID_AAI_HOST}/'${VID_AAI_HOST}'/g' \
- -e 's/${VID_AAI_PORT}/'${VID_AAI_PORT}'/g' \
- -e 's,${AAI_TRUSTSTORE_FILENAME},'${AAI_TRUSTSTORE_FILENAME}',g' \
- -e 's/${AAI_TRUSTSTORE_PASSWD_X}/'${AAI_TRUSTSTORE_PASSWD_X}'/g' \
- -e 's,${AAI_KEYSTORE_FILENAME},'${AAI_KEYSTORE_FILENAME}',g' \
- -e 's/${AAI_KEYSTORE_PASSWD_X}/'${AAI_KEYSTORE_PASSWD_X}'/g' \
- -e 's/${VID_APP_DISPLAY_NAME}/'${VID_APP_DISPLAY_NAME}'/g' \
- -e 's ${VID_ECOMP_SHARED_CONTEXT_REST_URL} '${VID_ECOMP_SHARED_CONTEXT_REST_URL}' g' \
- -e 's ${VID_ECOMP_REDIRECT_URL} '${VID_ECOMP_REDIRECT_URL}' g' \
- -e 's ${VID_ECOMP_REST_URL} '${VID_ECOMP_REST_URL}' g' \
- -e 's ${VID_MSO_SERVER_URL} '${VID_MSO_SERVER_URL}' g' \
- -e 's/${VID_MSO_USER}/'${VID_MSO_USER}'/g' \
- -e 's/${VID_MSO_PASS}/'${VID_MSO_PASS}'/g' \
- -e 's,${VID_MYLOGIN_FEED_DIRECTORY},'${VID_MYLOGIN_FEED_DIRECTORY}',g' \
- -e 's,${MSO_DME2_CLIENT_TIMEOUT},'${MSO_DME2_CLIENT_TIMEOUT}',g' \
- -e 's,${MSO_DME2_CLIENT_READ_TIMEOUT},'${MSO_DME2_CLIENT_READ_TIMEOUT}',g' \
- -e 's,${MSO_DME2_SERVER_URL},'${MSO_DME2_SERVER_URL}',g' \
- -e 's,${MSO_DME2_ENABLED},'${MSO_DME2_ENABLED}',g' \
- -e 's,${MSO_POLLING_INTERVAL_MSECS},'${MSO_POLLING_INTERVAL_MSECS}',g' \
- -e 's,${VID_TRUSTSTORE_FILE},'${VID_TRUSTSTORE_FILE}',g' \
- -e 's/${VID_TRUSTSTORE_PASS}/'${VID_TRUSTSTORE_PASS}'/g' ${TEMPLATE_CONFIG_FILE} > ${FINAL_CONFIG_FILE} || {
- echo "ERROR: Could not process template file ${TEMPLATE_CONFIG_FILE} into ${FINAL_CONFIG_FILE}"
- exit 4
- }
-
-echo "Localized ${FINAL_CONFIG_FILE} successfully."
-
-
|