3 # ============LICENSE_START==========================================
5 # ===================================================================
6 # Copyright © 2017 AT&T Intellectual Property. All rights reserved.
7 # Copyright © 2017 Amdocs
8 # ===================================================================
9 # Licensed under the Apache License, Version 2.0 (the "License");
10 # you may not use this file except in compliance with the License.
11 # You may obtain a copy of the License at
13 # http://www.apache.org/licenses/LICENSE-2.0
15 # Unless required by applicable law or agreed to in writing, software
16 # distributed under the License is distributed on an "AS IS" BASIS,
17 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 # See the License for the specific language governing permissions and
19 # limitations under the License.
20 # ============LICENSE_END============================================
21 # ECOMP is a trademark and service mark of AT&T Intellectual Property.
24 APP_HOME="/opt/app/champ-service"
25 GRAPH_DEPS_HOME="${APP_HOME}/graph-deps"
27 if [ -z "$CONFIG_HOME" ]; then
28 echo "CONFIG_HOME must be set in order to start up process"
32 if [ -z "$KEY_STORE_PASSWORD" ]; then
33 echo "KEY_STORE_PASSWORD must be set in order to start up process"
37 if [ -z "$SERVICE_BEANS" ]; then
38 echo "SERVICE_BEANS must be set in order to start up process"
42 for dir in $( find ${GRAPH_DEPS_HOME}/* -maxdepth 0 -type d ); do
43 CURRIMPL=$(basename $dir)
44 if [ "x$GRAPHIMPL" = "x$CURRIMPL" ]; then
45 GRAPHIMPL_DEPS="${GRAPH_DEPS_HOME}/${GRAPHIMPL}"
46 echo "Setting up graph implementation to $GRAPHIMPL"
48 SUPPORTED_GRAPHIMPL="$SUPPORTED_GRAPHIMPL $CURRIMPL"
52 if [ -z "$GRAPHIMPL_DEPS" ]; then
53 echo "Configured graph implementation '$GRAPHIMPL' is not supported. Acceptable implementations are one of: $SUPPORTED_GRAPHIMPL"
57 PROPS="-DAPP_HOME=$APP_HOME"
58 PROPS="$PROPS -DCONFIG_HOME=$CONFIG_HOME"
59 PROPS="$PROPS -DKEY_STORE_PASSWORD=$KEY_STORE_PASSWORD"
60 JVM_MAX_HEAP=${MAX_HEAP:-1024}
63 exec java -Xmx${JVM_MAX_HEAP}m $PROPS -Dloader.path="${GRAPHIMPL_DEPS}" -jar "${APP_HOME}/champ-service.jar"