update ubus-status.sh

This commit is contained in:
桐话
2024-07-03 07:23:25 +08:00
committed by GitHub
parent c61c9a273e
commit 66d597be4d
+1 -1
View File
@@ -40,7 +40,7 @@ check_ubus() {
killall rpcd 2>/dev/null
sleep 1
/sbin/rpcd -s /var/run/ubus/ubus.sock -t 30 &
elif echo "$rpcd_status" | grep -q "running"; then
elif [ "$(pgrep ubusd | wc -l)" -eq 1 ] && echo "$rpcd_status" | grep -q "running"; then
echo "$datetime / Ubus服务正在运行,一切正常。"
fi
}