From 6a1a518fec5507ba1115468e1e70dc410ed53b2f Mon Sep 17 00:00:00 2001 From: Kenichi HIROSE Date: Tue, 18 Dec 2018 14:05:17 +0000 Subject: [PATCH] Fix empty dhparam.pem --- generate-dhparam.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/generate-dhparam.sh b/generate-dhparam.sh index 3fdc77c..27b6432 100755 --- a/generate-dhparam.sh +++ b/generate-dhparam.sh @@ -37,7 +37,8 @@ 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 $DHPARAM_BITS 2>&1 \ + nice -n +5 openssl dhparam -out $DHPARAM_FILE.tmp $DHPARAM_BITS 2>&1 \ + && mv $DHPARAM_FILE.tmp $DHPARAM_FILE \ && echo "dhparam generation complete, reloading nginx" \ && nginx -s reload ) | grep -vE '^[\.+]+'