blob: 0e11779bee92c3b4ff215bb901c0ea9cf43e9636 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
#!/bin/sh
BASEDIR="/opt/app/data-router/"
AJSC_HOME="$BASEDIR"
AJSC_CONF_HOME="$AJSC_HOME/bundleconfig/"
if [ -z "$CONFIG_HOME" ]; then
echo "CONFIG_HOME must be set in order to start up process"
exit 1
fi
if [ -z "$KEY_STORE_PASSWORD" ]; then
echo "KEY_STORE_PASSWORD must be set in order to start up process"
exit 1
else
echo "KEY_STORE_PASSWORD=$KEY_STORE_PASSWORD\n" >> $AJSC_CONF_HOME/etc/sysprops/sys-props.properties
fi
if [ -z "$KEY_MANAGER_PASSWORD" ]; then
echo "KEY_MANAGER_PASSWORD must be set in order to start up process"
exit 1
else
echo "KEY_MANAGER_PASSWORD=$KEY_MANAGER_PASSWORD\n" >> $AJSC_CONF_HOME/etc/sysprops/sys-props.properties
fi
# Add any routes configured at deploy time to the data layer service
if [ -n "$DYNAMIC_ROUTES" ]; then
echo "Adding the following dynamic routes to the deployment: "
mkdir -p /tmp/data-router/v1/routes
for f in `ls $DYNAMIC_ROUTES`
do
cp $DYNAMIC_ROUTES/$f /tmp/data-router/v1/routes
echo "Adding dynamic route $DYNAMIC_ROUTES/$f"
done
jar uf /opt/app/data-router/services/data-router_v1.zip* -C /tmp/ data-router
rm -rf /tmp/data-router
fi
# Add any spring bean configuration files to the data layer deployment
if [ -n "$SERVICE_BEANS" ]; then
echo "Adding the following dynamic service beans to the deployment: "
mkdir -p /tmp/data-router/v1/conf
for f in `ls $SERVICE_BEANS`
do
cp $SERVICE_BEANS/$f /tmp/data-router/v1/conf
echo "Adding dynamic service bean $SERVICE_BEANS/$f"
done
jar uf /opt/app/data-router/services/data-router_v1.zip* -C /tmp/ data-router
rm -rf /tmp/data-router
fi
# Add any dynamic component configuration files to the data layer deployment
if [ -n "$COMPLIB" ]; then
echo "Adding the following dynamic libraries to the deployment: "
mkdir -p /tmp/data-router/v1/lib
for f in `ls $COMPLIB`
do
cp $COMPLIB/$f /tmp/data-router/v1/lib
echo "Adding dynamic library $COMPLIB/$f"
done
jar uf /opt/app/data-router/services/data-router_v1.zip* -C /tmp/ data-router
rm -rf /tmp/data-router
fi
CLASSPATH="$AJSC_HOME/lib/*"
CLASSPATH="$CLASSPATH:$AJSC_HOME/extJars/"
CLASSPATH="$CLASSPATH:$AJSC_HOME/etc/"
PROPS="-DAJSC_HOME=$AJSC_HOME"
PROPS="$PROPS -DAJSC_CONF_HOME=$AJSC_CONF_HOME"
PROPS="$PROPS -Dlogback.configurationFile=$BASEDIR/bundleconfig/etc/logback.xml"
PROPS="$PROPS -DAJSC_SHARED_CONFIG=$AJSC_CONF_HOME"
PROPS="$PROPS -DAJSC_SERVICE_NAMESPACE=data-router"
PROPS="$PROPS -DAJSC_SERVICE_VERSION=v1"
PROPS="$PROPS -Dserver.port=9502"
PROPS="$PROPS -DCONFIG_HOME=$CONFIG_HOME"
JVM_MAX_HEAP=${MAX_HEAP:-1024}
echo $CLASSPATH
exec java -Xmx${JVM_MAX_HEAP}m $PROPS -classpath $CLASSPATH com.att.ajsc.runner.Runner context=// sslport=9502
|