1
0
mirror of https://github.com/thib8956/nginx-proxy synced 2025-07-13 11:54:34 +00:00

Merge pull request #913 from panteparak/DH-Param-Generator-Option

Add DH param generator option
This commit is contained in:
Jason Wilder
2019-03-05 12:46:49 -07:00
committed by GitHub
3 changed files with 22 additions and 11 deletions

View File

@ -2,6 +2,7 @@
# The first argument is the bit depth of the dhparam, or 2048 if unspecified
DHPARAM_BITS=${1:-2048}
GENERATE_DHPARAM=${2:-true}
# If a dhparam file is not available, use the pre-generated one and generate a new one in the background.
# Note that /etc/nginx/dhparam is a volume, so this dhparam will persist restarts.
@ -25,6 +26,11 @@ if [[ -f $DHPARAM_FILE ]]; then
fi
fi
if [[ $GENERATE_DHPARAM =~ ^[Ff][Aa][Ll][Ss][Ee]$ ]]; then
echo "Skipping Diffie-Hellman parameters generation and Ignoring pre-generated dhparam.pem"
exit 0
fi
cat >&2 <<-EOT
WARNING: $DHPARAM_FILE was not found. A pre-generated dhparam.pem will be used for now while a new one
is being generated in the background. Once the new dhparam.pem is in place, nginx will be reloaded.