From 47d9f510a982d7aa490798ca9e104a18e836a920 Mon Sep 17 00:00:00 2001 From: mihalin Date: Wed, 12 Jan 2022 00:17:33 +0300 Subject: [PATCH] custom certificate create directory --- docker-entrypoint.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index b5561da..4f9dd3d 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -5,7 +5,9 @@ if [ ! -z "${CUSTOM_CERT}" ]; then echo "Use custom certificate" if [ ! -f /cert/private.key ]; then echo "Generate new certificate" - openssl req -newkey rsa:2048 -sha256 -nodes -keyout /cert/private.key -x509 -days 1000 -out /cert/public.pem -subj "/C=US/ST=Berlin/L=Berlin/O=my_org/CN=${WEBHOOK_HOST}" + rm -rf /cert + mkdir /cert + openssl req -newkey rsa:2048 -sha256 -nodes -keyout /cert/private.key -x509 -days 10000 -out /cert/public.pem -subj "/C=US/ST=Berlin/L=Berlin/O=my_org/CN=${WEBHOOK_HOST}" fi fi