minor changes, auto-certificate

This commit is contained in:
mihalin 2021-09-15 23:20:08 +03:00
parent 289b0d239a
commit 057d17a296

View File

@ -2,7 +2,9 @@
set -e set -e
if [[ -z "${CUSTOM_CERT}" ]]; then if [[ -z "${CUSTOM_CERT}" ]]; then
echo "Use custom certificate"
if [ ! -f /cert/private.key ]; then 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=my_cn" 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=my_cn"
fi fi
fi fi