From 91c9ad8c1e22a613f8323decb3af5d8eea6a67ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A1=90=E8=AF=9D?= <49544781+xiaomeng9597@users.noreply.github.com> Date: Tue, 2 Jul 2024 20:23:05 +0800 Subject: [PATCH] update ubus-status.sh --- configfiles/ubus-status.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configfiles/ubus-status.sh b/configfiles/ubus-status.sh index 3155037..3a1be81 100644 --- a/configfiles/ubus-status.sh +++ b/configfiles/ubus-status.sh @@ -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服务正在运行,一切正常。" else echo "$datetime / Ubus服务异常,正在重启Ubus。"