diff options
author | DR695H <dr695h@att.com> | 2017-02-07 13:11:03 -0500 |
---|---|---|
committer | DR695H <dr695h@att.com> | 2017-02-07 13:12:28 -0500 |
commit | 13ce0552dc7156b6e3e226c00295705f27780a40 (patch) | |
tree | a9ada50d0a86c0fdc253c188d1328f6e880bfaf5 /vid/src/main/swm/common/common.sh | |
parent | 77b87f76ff2799bd1f5fe85552f1c5e7081eb4df (diff) |
actually adding the files to the initial commit
Change-Id: I2f0c09692c2ae70be61b8bb552fd1bd2983eb661
Signed-off-by: DR695H <dr695h@att.com>
Diffstat (limited to 'vid/src/main/swm/common/common.sh')
-rw-r--r-- | vid/src/main/swm/common/common.sh | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/vid/src/main/swm/common/common.sh b/vid/src/main/swm/common/common.sh new file mode 100644 index 00000000..7308ffc7 --- /dev/null +++ b/vid/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 +} |