install_nginx.sh: directory '/etc/nginx/ssl' was not created on a fresh install at debian 12.

This commit is contained in:
Christoph 2023-10-30 18:59:06 +01:00
parent f1c19afa6c
commit 748e47b70b

View File

@ -254,6 +254,19 @@ done
blank_line
echononl "Create directory \"/etc/nginx/ssl\".."
if [[ ! -d "/etc/nginx/ssl" ]] ; then
mkdir "/etc/nginx/ssl" > ${log_file} 2>&1
if [[ $? -ne 0 ]] ; then
echo_failed
error "$(cat $log_file)"
else
echo_ok
fi
else
echo_skipped
fi
_failed=false
if [[ ${OPENSSL_MAJOR_VERSION} -gt 1 ]]; then
echononl "Generate a dhparam.pem file - \033[5m\033[1mmay take a lon time\033[m .."
@ -269,17 +282,8 @@ elif [[ -f "/etc/nginx/ssl/dhparam.pem" ]]; then
echo_skipped
else
echononl "Generate a dhparam.pem file with parameter '-dsaparam'.."
if [[ ! -d "/etc/nginx/ssl" ]] ; then
mkdir /etc/nginx/ssl > ${log_file} 2>&1
if [[ $? -ne 0 ]] ; then
_failed=true
fi
fi
openssl dhparam -dsaparam -out /etc/nginx/ssl/dhparam.pem 2048 >> ${log_file} 2>&1
if [[ $? -ne 0 ]] ; then
_failed=true
fi
if $_failed ; then
echo_failed
error "$(cat $log_file)"
else