This commit is contained in:
邱博亞 2024-04-17 21:59:58 +08:00
parent 57a64cdf1f
commit 9f076ee944
1 changed files with 2 additions and 1 deletions

View File

@ -57,7 +57,7 @@ target_openssl_ver="1.1.1w"
if [ "$(readlink -f `which openssl`)" == "/opt/openssl/bin/openssl" ]; then
openssl_dir="/opt/openssl/ssl"
openssl_source_dir="/root/openssl-$target_openssl_ver"
if [ -z `sudo readlink -f "$openssl_source_dir"` ]; then
if [ ! -e "$openssl_source_dir" ] || [ -z `readlink -f "$openssl_source_dir"` ]; then
force_reinstall_openssl="1"
else
if [ -d /opt/openssl/ssl/certs ] && [ ! -L /opt/openssl/ssl/certs ]; then
@ -254,6 +254,7 @@ if [[ $(vercomp "$nginx_ver" "$nginx_target_ver") == "<" ]] || [[ "$1" == '--fo
fi
if [[ $nginx_conf_exist == "0" ]]; then
nginx_conf_path="/etc/nginx/nginx.conf"
sudo cp -f /etc/nginx/nginx.conf /etc/nginx/nginx_bak.conf
server_block_start=`sudo grep -E '^\s*server\s*{' $nginx_conf_path -n|cut -d : -f 1`
http_block_start=`sudo grep -E '^\s*http\s*{' $nginx_conf_path -n|cut -d : -f 1`
http_block_end_offset=`cat $nginx_conf_path | awk '{if (NR>='$http_block_start') print}'|grep -E '^}' -n|cut -d : -f 1|xargs|awk '{print $1}'`