This commit is contained in:
BoHung Chiu 2022-08-24 18:09:51 +08:00
parent 99727ae8fb
commit d904eed23b
1 changed files with 2 additions and 2 deletions

View File

@ -16,14 +16,14 @@ wget http://gitlab.tp.rulingcom.com/erictyl/install_r45_on_ubuntu_1804lts_doc/-/
bash install_nginx.sh
sudo nginx -t
nginx_status="$(echo $?)"
if [ $nginx_status != 0 ]; then
if [ $nginx_status != "0" ]; then
sudo sed -i 's/\([^#]include \/etc\/nginx\/sites-enabled\/*\)/\#\1/g' /etc/nginx/nginx.conf
fi
sudo service nginx restart
cd /etc/nginx/
sudo mkdir orbit_sites/
if [ -z "$(grep 'orbit_sites' nginx.conf)" ]; then
sudo sed -i 's/\(include\ \/etc\/nginx\/sites-enabled\/\*\;\)/\1\n\tinclude\ \/etc\/nginx\/orbit_sites\/*;/g' nginx.conf
sudo sed -i 's/\(include\ \/etc\/nginx\/sites-enabled\/\*\;\)/\1\n include\ \/etc\/nginx\/orbit_sites\/*;/g' nginx.conf
fi
cd $org_pwd
sudo apt-get install gnupg -y