fix nginx shell script for sub

This commit is contained in:
Stille 2022-08-23 09:57:39 +08:00
parent db7fa7a2a0
commit fa1bf9e73c
1 changed files with 10 additions and 4 deletions

View File

@ -17,6 +17,7 @@ fi
nohup /base/subconverter & echo "启动成功"
init_nginx (){
sed -i '$d' /etc/nginx/conf.d/default.conf
sed -i '$d' /etc/nginx/conf.d/default.conf
sed -i '$d' /etc/nginx/conf.d/default.conf
@ -27,5 +28,10 @@ cat >> /etc/nginx/conf.d/default.conf <<EOF
}
}
EOF
}
if [[ ! $(cat /etc/nginx/conf.d/default.conf | grep 25500) ]]; then
init_nginx
fi
nginx -g "daemon off;"