From 73e95bd7d3eaa93c6b26099980b7bb4e5e284c88 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 18:55:32 +0800 Subject: [PATCH] update ubus-status.sh --- configfiles/ubus-status.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/configfiles/ubus-status.sh b/configfiles/ubus-status.sh index 2f19b90..3155037 100644 --- a/configfiles/ubus-status.sh +++ b/configfiles/ubus-status.sh @@ -42,6 +42,12 @@ check_ubus() { /sbin/rpcd -s /var/run/ubus/ubus.sock -t 30 & elif echo "$rpcd_status" | grep -q "running"; then echo "$datetime / Ubus服务正在运行,一切正常。" + else + echo "$datetime / Ubus服务异常,正在重启Ubus。" + killall ubusd 2>/dev/null + killall rpcd 2>/dev/null + sleep 1 + /sbin/rpcd -s /var/run/ubus/ubus.sock -t 30 & fi }