1
0
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:
Nicolas Duchon
2021-04-29 03:18:40 +02:00
parent c327496495
commit ab81ff8df2
2 changed files with 7 additions and 7 deletions

View File

@ -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