Fix the docker build error for vfc-nfvo-wfengine
[vfc/nfvo/wfengine.git] / wfenginemgrservice / src / main / docker / bin / run.sh
1 #
2 # Copyright 2017 ZTE Corporation.
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 #     http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 #
16
17 DIRNAME=`dirname $0`
18 RUNHOME=`cd $DIRNAME/; pwd`
19 echo @RUNHOME@ $RUNHOME
20
21 if [ -z "$1" ]; then
22     dwApp_msbClientConfig_msbSvrIp="127.0.0.1"
23 elif [ "$OPENPALETTE_MSB_IP" ]; then
24     dwApp_msbClientConfig_msbSvrIp=$OPENPALETTE_MSB_IP
25 else
26     dwApp_msbClientConfig_msbSvrIp=$1
27 fi
28 if [ -z "$2" ]; then
29     dwApp_msbClientConfig_msbSvrPort="80"
30 elif [ "$OPENPALETTE_MSB_PORT" ]; then
31     dwApp_msbClientConfig_msbSvrPort=$OPENPALETTE_MSB_PORT
32 else
33     dwApp_msbClientConfig_msbSvrPort=$2
34 fi
35 echo " dwApp_MSB_ADDR=${dwApp_msbClientConfig_msbSvrIp}:${dwApp_msbClientConfig_msbSvrPort}"
36
37 if [ -f "$RUNHOME/setenv.sh" ]; then
38   . "$RUNHOME/setenv.sh"
39 else
40 echo "can not found $RUNHOME/setenv.sh"
41 fi
42
43 echo ================== ENV_INFO  =============================================
44 echo @RUNHOME@  $RUNHOME
45 echo @Main_Class@  $Main_Class
46 echo @APP_INFO@  $APP_INFO
47 echo @Main_JAR@  $Main_JAR
48 echo @Main_Conf@ $Main_Conf
49 echo ==========================================================================
50
51 echo start $APP_INFO ...
52
53 JAVA="$JAVA_HOME/bin/java"
54 JAVA_OPTS="-Xms50m -Xmx128m"
55 #port=26000
56 #JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=$port,server=y,suspend=n"
57 CLASS_PATH="$EXT_DIRS:$RUNHOME/:$RUNHOME/$Main_JAR"
58
59 echo ================== RUN_INFO  =============================================
60 echo @JAVA_HOME@ $JAVA_HOME
61 echo @JAVA@ $JAVA
62 echo @JAVA_OPTS@ $JAVA_OPTS
63 echo @CLASS_PATH@ $CLASS_PATH
64 echo @EXT_DIRS@ $EXT_DIRS
65 echo ==========================================================================
66
67 echo `env`
68
69 echo @JAVA@ $JAVA
70 echo @JAVA_CMD@
71 "$JAVA" $JAVA_OPTS -classpath "$CLASS_PATH" $Main_Class server "$RUNHOME/$Main_Conf"
72