Update FProxy to separate truststore and keystore
[aaf/cadi.git] / sidecar / fproxy / src / main / bin / start.sh
1 #!/bin/sh
2
3 # ============LICENSE_START=======================================================
4 # org.onap.aaf
5 # ================================================================================
6 # Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
7 # Copyright © 2017-2018 European Software Marketing Ltd.
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
12 #
13 #      http://www.apache.org/licenses/LICENSE-2.0
14 #
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
22 BASEDIR="/opt/app/fproxy"
23
24 if [ -z "${KEY_STORE_PASSWORD}" ]; then
25         echo "KEY_STORE_PASSWORD must be set in order to start up process"
26         exit 1
27 fi
28
29 if [ -z "${TRUST_STORE_PASSWORD}" ]; then
30         echo "TRUST_STORE_PASSWORD must be set in order to start up process"
31         exit 1
32 fi
33
34 PROPS="-DKEY_STORE_PASSWORD=${KEY_STORE_PASSWORD}"
35 PROPS="$PROPS -DTRUST_STORE_PASSWORD=${TRUST_STORE_PASSWORD}"
36
37 JVM_MAX_HEAP=${MAX_HEAP:-1024}
38
39 exec java -Xmx${JVM_MAX_HEAP}m ${PROPS} -jar ${BASEDIR}/fproxy-exec.jar