diff --git a/sb.sh b/sb.sh index 5baad7b..9a15de0 100644 --- a/sb.sh +++ b/sb.sh @@ -1111,7 +1111,7 @@ echo resvmess(){ if [[ "$tls" = "false" ]]; then argopid -if [[ -n $(ps -e | grep -w $ls 2>/dev/null) ]]; then +if ps -p "$ls" >/dev/null 2>&1; then echo white "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" red "🚀【 vmess-ws(tls)+Argo 】临时节点信息如下(可选择3-8-3,自定义CDN优选地址):" && sleep 2 @@ -1607,7 +1607,7 @@ EOF tls=$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[1].tls.enabled') argopid -if ps -ef | grep -q '[c]loudflared.*run' && ps -e | grep -qw "$ls" 2>/dev/null && [ "$tls" = "false" ]; then +if ps -ef | grep -q '[c]loudflared.*run' && ps -p "$ls" >/dev/null 2>&1 && [ "$tls" = "false" ]; then cat > /etc/s-box/sing_box_client.json </dev/null && [ "$tls" = "false" ]; then +elif ! ps -ef | grep -q '[c]loudflared.*run' && ps -p "$ls" >/dev/null 2>&1 && [ "$tls" = "false" ]; then cat > /etc/s-box/sing_box_client.json </dev/null && [ "$tls" = "false" ]; then +elif ps -ef | grep -q '[c]loudflared.*run' && ! ps -p "$ls" >/dev/null 2>&1 && [ "$tls" = "false" ]; then cat > /etc/s-box/sing_box_client.json </dev/null; then +if ps -ef | grep -q '[c]loudflared.*run' || ps -p "$ls" >/dev/null 2>&1; then vm_zs="TLS关闭" argoym="已开启" else @@ -3963,7 +3963,7 @@ fi if [ "$argoym" = "已开启" ]; then echo -e "Vmess-UUID:${yellow}$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[0].users[0].uuid')${plain}" echo -e "Vmess-Path:${yellow}$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[1].transport.path')${plain}" -if [[ -n $(ps -e | grep -w $ls 2>/dev/null) ]]; then +if ps -p "$ls" >/dev/null 2>&1; then echo -e "Argo临时域名:${yellow}$(cat /etc/s-box/argo.log 2>/dev/null | grep -a trycloudflare.com | awk 'NR==2{print}' | awk -F// '{print $2}' | awk '{print $1}')${plain}" fi if ps -ef | grep -q '[c]loudflared.*run'; then