From afc5c02215818dc2523abcbba4e14c905956d184 Mon Sep 17 00:00:00 2001 From: bohung Date: Sat, 20 Aug 2022 16:35:44 +0800 Subject: [PATCH] Update install nginx script. --- install_nginx.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/install_nginx.sh b/install_nginx.sh index d64a066..c953743 100644 --- a/install_nginx.sh +++ b/install_nginx.sh @@ -9,7 +9,11 @@ cpu_cores="$(nproc --all)" openssl_ver="$(openssl version|xargs| awk '{print $2}')" openssl_dir="" openssl_source_dir="" -if [[ "$openssl_ver" < "1.1.1" ]]; then +force_reinstall_openssl="0" +if [[ ! -d "/usr/include/openssl" ]] && [[ ! -d "/usr/local/include/openssl" ]] && [[ ! -d "/usr/pkg/include/openssl" ]] && [[ ! -d "/opt/local/include/openssl" ]]; then + force_reinstall_openssl="1" +fi +if [[ "$openssl_ver" < "1.1.1" ]] || [[ "$force_reinstall_openssl" == "1" ]]; then # Build openssl target_openssl_ver="1.1.1m" sudo bash -l -c "