1+ #! /bin/bash
2+ # ###############################################################################
3+ # Copyright 2014 CapitalOne, LLC.
4+ # Further development Copyright 2022 Sapient Corporation.
5+ #
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
9+ #
10+ # http://www.apache.org/licenses/LICENSE-2.0
11+ #
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.
17+ #
18+ # ###############################################################################
19+
20+ counter=1
21+
22+ # Loop through each certificate file and import it to the keystore with an incrementing alias
23+ for cert_file in $certhostpath /* .cer
24+ do
25+ # Generate the alias for the certificate
26+ alias=" $keytoolalias$counter "
27+ echo -e " \033[32m"
28+ # Import the certificate to the keystore
29+ keytool -importcert -keystore " $keystorefile " -storepass changeit -alias " $alias " -file " $cert_file " -noprompt -v
30+ echo -e " \033[0m"
31+ # Increment the counter
32+ counter=$(( counter+ 1 ))
33+ echo " Imported $cert_file to $keystorefile as $alias ."
34+ done
35+
36+ # Conditionally run the JAR files based on environment variables
37+
38+ if [ " $RUN_ZEPHYR " == " true" ]; then
39+ java -jar zephyr.jar --spring.config.location=classpath:/BOOT-INF/classes/application.properties --spring.config.additional-location=optional:file:/app/properties/zephyr.properties &
40+ echo " Running Zephyr processor..."
41+ fi
42+
43+ if [ " $RUN_JIRATEST " == " true" ]; then
44+ java -jar jiratest.jar --spring.config.location=classpath:/BOOT-INF/classes/application.properties --spring.config.additional-location=optional:file:/app/properties/jiratest.properties &
45+ echo " Running Jira Test processor..."
46+ fi
47+
48+ wait
0 commit comments