Compare commits

..

2 Commits

Author SHA1 Message Date
邱博亞 d103562362 Fix install_orbit_environment.sh 2024-01-01 10:44:53 +08:00
邱博亞 a1dc79f11f Fix install_nginx.sh 2024-01-01 10:44:53 +08:00
1 changed files with 10 additions and 10 deletions

View File

@ -286,6 +286,13 @@ if [[ $(vercomp "$nginx_ver" "$nginx_target_ver") == "<" ]] || [[ "$1" == '--fo
http_block_end=$((http_block_end + 1)) http_block_end=$((http_block_end + 1))
fi fi
done done
fi
if [[ -z "$(grep -E 'include\s+\/etc\/nginx\/modules-enabled\/\*\.conf;' /etc/nginx/nginx.conf)" ]]; then
nginx_conf_path="/etc/nginx/nginx.conf"
nginx_conf_contents=`echo "$(echo 'include /etc/nginx/modules-enabled/*.conf;'; cat $nginx_conf_path)"`
sudo bash -l -c "echo '$nginx_conf_contents' > $nginx_conf_path"
sudo service nginx restart
fi
if [[ "$install_modsecurity" == "1" ]]; then if [[ "$install_modsecurity" == "1" ]]; then
echo "Please modify your nginx conf file by yourself!" echo "Please modify your nginx conf file by yourself!"
echo " echo "
@ -296,12 +303,5 @@ if [[ $(vercomp "$nginx_ver" "$nginx_target_ver") == "<" ]] || [[ "$1" == '--fo
} }
" "
fi fi
fi
if [[ -z "$(grep -E 'include\s+\/etc\/nginx\/modules-enabled\/\*\.conf;' /etc/nginx/nginx.conf)" ]]; then
nginx_conf_path="/etc/nginx/nginx.conf"
nginx_conf_contents=`echo "$(echo 'include /etc/nginx/modules-enabled/*.conf;'; cat $nginx_conf_path)"`
sudo bash -l -c "echo '$nginx_conf_contents' > $nginx_conf_path"
sudo service nginx restart
fi
cd "$org_pwd" cd "$org_pwd"
fi fi