diff --git a/install_nginx.sh b/install_nginx.sh index c167b27..aa2e47d 100644 --- a/install_nginx.sh +++ b/install_nginx.sh @@ -103,6 +103,10 @@ if [[ "$nginx_ver" < $nginx_target_ver ]] || [[ "$1" == '--force' ]] || [[ "$ins else nginx_conf_exist="0" fi + nginx_org_path="$(which nginx)" + if [[ ! -z "$nginx_org_path" ]]; then + rm -f $nginx_org_path + fi #Build nginx and install sudo bash -l -c " cd /root && \