Fix bug.
This commit is contained in:
parent
57a64cdf1f
commit
9f076ee944
|
@ -57,7 +57,7 @@ target_openssl_ver="1.1.1w"
|
||||||
if [ "$(readlink -f `which openssl`)" == "/opt/openssl/bin/openssl" ]; then
|
if [ "$(readlink -f `which openssl`)" == "/opt/openssl/bin/openssl" ]; then
|
||||||
openssl_dir="/opt/openssl/ssl"
|
openssl_dir="/opt/openssl/ssl"
|
||||||
openssl_source_dir="/root/openssl-$target_openssl_ver"
|
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"
|
force_reinstall_openssl="1"
|
||||||
else
|
else
|
||||||
if [ -d /opt/openssl/ssl/certs ] && [ ! -L /opt/openssl/ssl/certs ]; then
|
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
|
fi
|
||||||
if [[ $nginx_conf_exist == "0" ]]; then
|
if [[ $nginx_conf_exist == "0" ]]; then
|
||||||
nginx_conf_path="/etc/nginx/nginx.conf"
|
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`
|
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_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}'`
|
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}'`
|
||||||
|
|
Loading…
Reference in New Issue