mirror of
https://github.com/thib8956/nginx-proxy
synced 2025-07-13 11:54:34 +00:00
style: linting with shellcheck
This commit is contained in:
@ -15,7 +15,7 @@ GEN_LOCKFILE="/tmp/dhparam_generating.lock"
|
||||
PREGEN_HASH=$(md5sum $PREGEN_DHPARAM_FILE | cut -d" " -f1)
|
||||
if [[ -f $DHPARAM_FILE ]]; then
|
||||
CURRENT_HASH=$(md5sum $DHPARAM_FILE | cut -d" " -f1)
|
||||
if [[ $PREGEN_HASH != $CURRENT_HASH ]]; then
|
||||
if [[ $PREGEN_HASH != "$CURRENT_HASH" ]]; then
|
||||
# There is already a dhparam, and it's not the default
|
||||
echo "Custom dhparam.pem file found, generation skipped"
|
||||
exit 0
|
||||
@ -44,10 +44,10 @@ 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 -dsaparam -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
|
||||
) | grep -vE '^[\.+]+'
|
||||
rm $GEN_LOCKFILE
|
||||
) &disown
|
||||
) & disown
|
||||
|
Reference in New Issue
Block a user