From 54876c549988c3e09d020dd2fb16dd3420893d9d Mon Sep 17 00:00:00 2001 From: sadnub Date: Mon, 23 Nov 2020 10:33:50 -0500 Subject: [PATCH] fixes to domain in cert generation --- docker/containers/tactical-nginx/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/containers/tactical-nginx/entrypoint.sh b/docker/containers/tactical-nginx/entrypoint.sh index f67e691c..aa2aea6c 100644 --- a/docker/containers/tactical-nginx/entrypoint.sh +++ b/docker/containers/tactical-nginx/entrypoint.sh @@ -20,7 +20,7 @@ if [ "${CERT_PRIV_KEY}" != '' ] || [ "${CERT_PUB_KEY}" != '' ]; then else # generate a self signed cert if [ ! -f "${CERT_PRIV_PATH}" ] || [ ! -f "${CERT_PUB_PATH}" ]; then - rootdomain=$(echo ${API_HOST} | cut -d "." -f 2,3 ) + rootdomain=$(echo ${API_HOST} | cut -d "." -f2- ) openssl req -newkey rsa:4096 -x509 -sha256 -days 365 -nodes -out ${CERT_PUB_PATH} -keyout ${CERT_PRIV_PATH} -subj "/C=US/ST=Some-State/L=city/O=Internet Widgits Pty Ltd/CN=*.${rootdomain}" fi fi