ilanap | 820f4ec | 2019-11-18 13:38:23 +0200 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | HTTPS_ENABLED=${SERVER_SSL_ENABLED:-"false"} |
| 4 | if [ "$HTTPS_ENABLED" = "true" ] |
| 5 | then |
andre.schmid | 27564b7 | 2020-05-05 11:11:54 +0100 | [diff] [blame] | 6 | echo "HTTPS is enabled. Configuring keystore." |
ilanap | 820f4ec | 2019-11-18 13:38:23 +0200 | [diff] [blame] | 7 | 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.schmid | 27564b7 | 2020-05-05 11:11:54 +0100 | [diff] [blame] | 28 | else |
| 29 | echo "HTTPS is disabled." |
ilanap | 820f4ec | 2019-11-18 13:38:23 +0200 | [diff] [blame] | 30 | fi |
| 31 | java ${JAVA_OPTIONS} -jar /app.jar ${SPRING_BOOT_OPTIONS} |