aboutsummaryrefslogtreecommitdiffstats
path: root/epsdk-app-onap/src/main/swm/common/common.sh
diff options
context:
space:
mode:
authorjimmydot <jf2512@att.com>2017-05-07 14:58:24 -0400
committerjimmydot <jf2512@att.com>2017-05-07 14:58:24 -0400
commit3982f4f67314ec37fd9b22ae54049958af777c1b (patch)
tree72111b7c13ee7529cce1ea4c8d83c89fdd164450 /epsdk-app-onap/src/main/swm/common/common.sh
parent00e0d25933699f9e39c3f0b86c983165a1e3e330 (diff)
[VID-6] Initial rebase push
Change-Id: I9077be9663754d9b22f77c6a7b3109b361b39346 Signed-off-by: jimmydot <jf2512@att.com>
Diffstat (limited to 'epsdk-app-onap/src/main/swm/common/common.sh')
-rwxr-xr-xepsdk-app-onap/src/main/swm/common/common.sh35
1 files changed, 35 insertions, 0 deletions
diff --git a/epsdk-app-onap/src/main/swm/common/common.sh b/epsdk-app-onap/src/main/swm/common/common.sh
new file mode 100755
index 000000000..4b98a5eac
--- /dev/null
+++ b/epsdk-app-onap/src/main/swm/common/common.sh
@@ -0,0 +1,35 @@
+#!/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
+}