Add remove nginx before rebuilding.

This commit is contained in:
BoHung Chiu 2022-09-12 21:47:52 +08:00
parent 39414f747d
commit ef08ea036b
1 changed files with 4 additions and 0 deletions

View File

@ -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 && \