3 # ============LICENSE_START==========================================
5 # ===================================================================
6 # Copyright (c) 2019 AT&T Intellectual Property
7 # ===================================================================
8 # Licensed under the Apache License, Version 2.0 (the "License");
9 # you may not use this file except in compliance with the License.
10 # You may obtain a copy of the License at
12 # http://www.apache.org/licenses/LICENSE-2.0
14 # Unless required by applicable law or agreed to in writing, software
15 # distributed under the License is distributed on an "AS IS" BASIS,
16 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 # See the License for the specific language governing permissions and
18 # limitations under the License.
20 # ============LICENSE_END=============================================
21 # ====================================================================
23 echo "Running startup script to get password from certman"
24 PWFILE=/opt/app/aafcertman/.password
25 LOGFILE=/opt/app/music/logs/MUSIC/music-sb.log
26 echo "PWFILE=${PWFILE}" >> $LOGFILE
27 if [ -f $PWFILE ]; then
28 echo "Found ${PWFILE}" >> $LOGFILE
29 PASSWORD=$(cat ${PWFILE})
30 echo "#### Using Password from ${PWFILE} for Certs" >> ${LOGFILE}
33 echo "#### Using Default Password for Certs" >> ${LOGFILE}
36 if [ "${EXTAP_FILE}" != "" ]; then
37 EXTAP_OPTION="--spring.config.location=file:${EXTAP_FILE}"
40 echo "java -jar MUSIC-SB.jar ${EXTAP_OPTION} --server.ssl.key-store-password=${PASSWORD} --aaf_password=enc:${PASSWORD} 2>&1 | tee ${LOGFILE}"
41 java -jar MUSIC-SB.jar ${EXTAP_OPTION} --server.ssl.key-store-password="${PASSWORD}" --aaf_password="enc:${PASSWORD}" 2>&1 | tee ${LOGFILE}