Skip to content

Commit 9ad2270

Browse files
5ergiujaydrogers
andauthored
Do not generate SSL if DISABLE_DEFAULT_CONFIG is set (#644)
* Config checks for SSL certificate generation Add checks for DISABLE_DEFAULT_CONFIG and set default SSL file paths. * Removed comment since the code is readable --------- Co-authored-by: Jay Rogers <3174134+jaydrogers@users.noreply.github.com>
1 parent 5b27e89 commit 9ad2270

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/utilities-webservers/etc/entrypoint.d/5-generate-ssl.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
# Usage: 5-generate-ssl.sh
44
###################################################
55
# This script generates a self-signed SSL certificate and key for the container.
6-
script_name="generate-ssl"
6+
script_name="generate-ssl"
7+
8+
if [ "$DISABLE_DEFAULT_CONFIG" = "true" ]; then
9+
exit 0
10+
fi
711

812
SSL_CERTIFICATE_FILE=${SSL_CERTIFICATE_FILE:-"/etc/ssl/private/self-signed-web.crt"}
913
SSL_PRIVATE_KEY_FILE=${SSL_PRIVATE_KEY_FILE:-"/etc/ssl/private/self-signed-web.key"}
@@ -52,4 +56,4 @@ openssl req -x509 \
5256
-keyout "$SSL_PRIVATE_KEY_FILE" \
5357
-out "$SSL_CERTIFICATE_FILE" \
5458
-days 365 >/dev/null 2>&1
55-
exit 0
59+
exit 0

0 commit comments

Comments
 (0)