From f338ba61fbd9f2764157ae21a7b09444c5a77955 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=AC=E5=93=A5=E4=BE=83=E4=BE=83=E4=BE=83ygkkk?= <121604513+yonggekkk@users.noreply.github.com> Date: Thu, 26 Mar 2026 15:55:44 +0800 Subject: [PATCH] Fix error handling in sb.sh for sb.json Updated command to handle errors when reading sb.json. --- sb.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sb.sh b/sb.sh index 240f75e..e114e2a 100644 --- a/sb.sh +++ b/sb.sh @@ -3884,7 +3884,7 @@ systemctl disable "$svc" >/dev/null 2>&1 done rm -rf /etc/systemd/system/{sing-box.service,argo.service} fi -ps -ef | grep "localhost:$(sed 's://.*::g' /etc/s-box/sb.json | jq -r '.inbounds[1].listen_port')" | awk '{print $2}' | xargs kill 2>/dev/null +ps -ef | grep "localhost:$(sed 's://.*::g' /etc/s-box/sb.json 2>/dev/null | jq -r '.inbounds[1].listen_port')" | awk '{print $2}' | xargs kill 2>/dev/null ps -ef | grep '[s]bwpph' | awk '{print $2}' | xargs kill 2>/dev/null ps -ef | grep "$(cat /etc/s-box/subport.log 2>/dev/null)" | grep -v grep | awk 'NR==1 {print $2}' | xargs kill 2>/dev/null rm -rf /etc/s-box sbyg_update /usr/bin/sb /root/geoip.db /root/geosite.db /root/warpapi /root/warpip /root/websbox