3 # -------------------------------------------------------------------------
4 # Copyright (c) 2015-2017 AT&T Intellectual Property
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
18 # -------------------------------------------------------------------------
23 echo " $0 -h Display this help message."
24 echo " $0 -c configfile_path(optional) -x app.py file"
30 # bash ../etc/make-certs.sh # create the https certificates if they are not present
32 while getopts ":hc:x:" opt; do
38 # process option configuration
39 export OSDF_CONFIG_FILE=$OPTARG
42 # process executable file
43 export EXEC_FILE=$OPTARG
49 echo "Invalid Option: -$OPTARG requires an argument" 1>&2
54 shift $(( OPTIND - 1 ))
61 #if [ -e /opt/app/ssl_cert/aaf_root_ca.cer ]; then
62 # #assuming that this would be an ubuntu vm.
63 # cp /opt/app/ssl_cert/aaf_root_ca.cer /usr/local/share/ca-certificates/aafcacert.crt
64 # chmod 444 /usr/local/share/ca-certificates/aafcacert.crt
65 # update-ca-certificates
68 export REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt
70 if [ ! -z "$EXEC_FILE" ]
73 echo "Running $EXEC_FILE"
74 python $EXEC_FILE # running the app