1
0
Fork 0
mirror of https://github.com/nginx-proxy/nginx-proxy synced 2024-04-27 04:15:26 +02:00

update key length , speed up dhparam generation

This commit is contained in:
Benjamin Freitag 2020-06-15 04:22:58 +02:00 committed by GitHub
parent 3cbc5417b7
commit be107963a7
Signed by: GitHub
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,7 @@
#!/bin/bash -e
# The first argument is the bit depth of the dhparam, or 2048 if unspecified
DHPARAM_BITS=${1:-2048}
# The first argument is the bit depth of the dhparam, or 4096 if unspecified
DHPARAM_BITS=${1:-4096}
GENERATE_DHPARAM=${2:-true}
# If a dhparam file is not available, use the pre-generated one and generate a new one in the background.
@ -43,7 +43,7 @@ touch $GEN_LOCKFILE
# Generate a new dhparam in the background in a low priority and reload nginx when finished (grep removes the progress indicator).
(
(
nice -n +5 openssl dhparam -out $DHPARAM_FILE.tmp $DHPARAM_BITS 2>&1 \
nice -n +5 openssl dhparam -dsaparam -out $DHPARAM_FILE.tmp $DHPARAM_BITS 2>&1 \
&& mv $DHPARAM_FILE.tmp $DHPARAM_FILE \
&& echo "dhparam generation complete, reloading nginx" \
&& nginx -s reload