07f707eee49303d7e0559c395efdc057ae81954f
[aai/model-loader.git] / src / main / bin / start.sh
1 ###\r
2 # ============LICENSE_START=======================================================
3 # MODEL LOADER SERVICE
4 # ================================================================================
5 # Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 # ================================================================================
7 # Licensed under the Apache License, Version 2.0 (the "License");\r
8 # you may not use this file except in compliance with the License.\r
9 # You may obtain a copy of the License at\r
10\r
11 #      http://www.apache.org/licenses/LICENSE-2.0\r
12\r
13 # Unless required by applicable law or agreed to in writing, software\r
14 # distributed under the License is distributed on an "AS IS" BASIS,\r
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
16 # See the License for the specific language governing permissions and\r
17 # limitations under the License.
18 # ============LICENSE_END=========================================================\r
19 ###\r
20 \r
21 #!/bin/sh\r
22 \r
23 BASEDIR="/opt/app/model-loader/"\r
24 AJSC_HOME="$BASEDIR"\r
25 \r
26 if [ -z "$CONFIG_HOME" ]; then\r
27         echo "CONFIG_HOME must be set in order to start up process"\r
28         exit 1\r
29 fi\r
30 \r
31 CLASSPATH="$AJSC_HOME/lib/*"\r
32 CLASSPATH="$CLASSPATH:$AJSC_HOME/extJars/"\r
33 CLASSPATH="$CLASSPATH:$AJSC_HOME/etc/"\r
34 PROPS="-DAJSC_HOME=$AJSC_HOME"\r
35 PROPS="$PROPS -DAJSC_CONF_HOME=$BASEDIR/bundleconfig/"\r
36 PROPS="$PROPS -Dlogback.configurationFile=$BASEDIR/bundleconfig/etc/logback.xml"\r
37 PROPS="$PROPS -DAJSC_SHARED_CONFIG=$AJSC_CONF_HOME"\r
38 PROPS="$PROPS -DAJSC_SERVICE_NAMESPACE=model-loader"\r
39 PROPS="$PROPS -DAJSC_SERVICE_VERSION=v1"\r
40 PROPS="$PROPS -Dserver.port=8080"\r
41 PROPS="$PROPS -DCONFIG_HOME=$CONFIG_HOME"\r
42 \r
43 echo $CLASSPATH\r
44 \r
45 java -Xms1024m -Xmx4096m -XX:PermSize=2024m $PROPS -classpath $CLASSPATH com.att.ajsc.runner.Runner context=// sslport=8081\r