blob: cda039aba5f170c3b1601be2b00ce8140d09d6c7 [file] [log] [blame]
ilanap820f4ec2019-11-18 13:38:23 +02001#!/bin/sh
2
3HTTPS_ENABLED=${SERVER_SSL_ENABLED:-"false"}
4if [ "$HTTPS_ENABLED" = "true" ]
5then
andre.schmid27564b72020-05-05 11:11:54 +01006 echo "HTTPS is enabled. Configuring keystore."
ilanap820f4ec2019-11-18 13:38:23 +02007 KEYSTORE=${SERVER_SSL_KEYSTORE_PATH}
8 if [ -f "$KEYSTORE" ]; then
9 echo "$KEYSTORE exist"
10 else
11 echo "Copying default keystore"
12 KEYSTORE_DIR=${KEYSTORE%/*}
13 mkdir -p $KEYSTORE_DIR
14 cp /keystore $KEYSTORE_DIR
15 chmod 755 $KEYSTORE
16 fi
17
18 TRUSTSTORE=${SERVER_SSL_TRUSTSTORE_PATH}
19 if [ -f "$TRUSTSTORE" ]; then
20 echo "$TRUSTSTORE exist"
21 else
22 echo "Copying default truststore"
23 TRUSTSTORE_DIR=${TRUSTSTORE%/*}
24 mkdir -p $TRUSTSTORE_DIR
25 cp /truststore $TRUSTSTORE_DIR
26 chmod 755 $TRUSTSTORE
27 fi
andre.schmid27564b72020-05-05 11:11:54 +010028else
29 echo "HTTPS is disabled."
ilanap820f4ec2019-11-18 13:38:23 +020030fi
31java ${JAVA_OPTIONS} -jar /app.jar ${SPRING_BOOT_OPTIONS}