From 35ff64133d4934f5840c73963be3ffdab7d31921 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A1=90=E8=AF=9D?= <49544781+xiaomeng9597@users.noreply.github.com> Date: Sun, 7 Jul 2024 21:30:13 +0800 Subject: [PATCH] update ubus-status.sh --- configfiles/ubus-status.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configfiles/ubus-status.sh b/configfiles/ubus-status.sh index 1add102..5ed371c 100644 --- a/configfiles/ubus-status.sh +++ b/configfiles/ubus-status.sh @@ -24,12 +24,12 @@ check_ubus() { fi if [[ "$status_code" == 500 || "$status_code" == 502 ]] && echo "$rpcd_status" | grep -q "running"; then - echo "$datetime / Ubus服务异常,正在重启Ubus。" + echo "$datetime / Ubus服务异常1,正在重启Ubus。" killall rpcd 2>/dev/null sleep 1 /sbin/rpcd -s /var/run/ubus/ubus.sock -t 30 & elif echo "$rpcd_status" | grep -q "failed" || echo "$rpcd_status" | grep -q "Command failed" || echo "$rpcd_status" | grep -q "Failed" || echo "$rpcd_status" | grep -q "Failed to connect to ubus" || echo "$rpcd_status" | grep -q "inactive"; then - echo "$datetime / Ubus服务异常,正在重启Ubus。" + echo "$datetime / Ubus服务异常2,正在重启Ubus。" killall ubusd 2>/dev/null killall rpcd 2>/dev/null sleep 1