aboutsummaryrefslogtreecommitdiffstats
path: root/epsdk-app-onap/src/main/swm/common/localize_portal.sh
diff options
context:
space:
mode:
authorOfir Sonsino <os0695@att.com>2018-01-31 17:19:00 +0200
committerOfir Sonsino <os0695@att.com>2018-01-31 17:19:00 +0200
commit1cfb08779ea0e00be69e072a940b3063e049fe6b (patch)
tree6602a900387c8393ed0dcd81c0539381632903c6 /epsdk-app-onap/src/main/swm/common/localize_portal.sh
parent2f20b001b9243e0f8b44aecc768ec265fd538732 (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/localize_portal.sh')
-rwxr-xr-xepsdk-app-onap/src/main/swm/common/localize_portal.sh84
1 files changed, 0 insertions, 84 deletions
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."