Use bash instead of Bourne shell
[ccsdk/apps.git] / ms / neng / src / main / docker / startService.sh
1 #!/bin/bash
2 #============LICENSE_START=======================================================
3 #  ONAP : CCSDK.apps
4 #  ================================================================================
5 #  Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
6 #  ================================================================================
7 #  Licensed under the Apache License, Version 2.0 (the "License");
8 #  you may not use this file except in compliance with the License.
9 #  You may obtain a copy of the License at
10 #  
11 #       http://www.apache.org/licenses/LICENSE-2.0
12 #  
13 #  Unless required by applicable law or agreed to in writing, software
14 #  distributed under the License is distributed on an "AS IS" BASIS,
15 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 #  See the License for the specific language governing permissions and
17 #  limitations under the License.
18 #============LICENSE_END=========================================================
19
20 touch /app.jar
21 APP_ARGS=-Dspring.profiles.active=${SPRING_PROFILE}
22 APP_ARGS=${APP_ARGS}" -Dneng_db_user="${NENG_DB_USER}" -Dneng_db_pass="${NENG_DB_PASS}         
23 APP_ARGS=${APP_ARGS}" -Dneng_db_url="${NENG_DB_URL}                                        
24 APP_ARGS=${APP_ARGS}" -Dpol_client_auth="${POL_CLIENT_AUTH}                           
25 APP_ARGS=${APP_ARGS}" -Dpol_basic_auth="${POL_BASIC_AUTH}  
26 APP_ARGS=${APP_ARGS}" -Dpol_url="${POL_URL}                
27 APP_ARGS=${APP_ARGS}" -Dpol_env="${POL_ENV}              
28 APP_ARGS=${APP_ARGS}" -Dpol_req_id="${POL_REQ_ID}
29 APP_ARGS=${APP_ARGS}" -Daai_cert_pass="${AAI_CERT_PASS}
30 APP_ARGS=${APP_ARGS}" -Daai_cert_path="${AAI_CERT_PATH}
31 APP_ARGS=${APP_ARGS}" -Daai_uri="${AAI_URI}
32 APP_ARGS=${APP_ARGS}" -Daai_auth="${AAI_AUTH}
33 APP_ARGS=${APP_ARGS}" -cp /opt/etc/config"
34
35 echo "APP_ARGS ="${APP_ARGS}
36 java -Djava.security.egd=file:/dev/./urandom  ${APP_ARGS} -Xms1024m -Xmx1024m -jar /app.jar --spring.config.location=/opt/etc/config/ >(tee -a /tmp/app.out) 2> >(tee -a /tmp/app.err >&2)
37