From 2739789675df209b68d364fcb03f366ecdb5e878 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A1=90=E8=AF=9D?= <49544781+xiaomeng9597@users.noreply.github.com> Date: Sat, 29 Jun 2024 22:13: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 7ae0b68..63c494c 100644 --- a/configfiles/ubus-status.sh +++ b/configfiles/ubus-status.sh @@ -1,8 +1,8 @@ #!/bin/sh rpcd_start() { - rpcdstr=$(/etc/init.d/dbus status 2>&1) - if echo "$rpcdstr" | grep -q "Failed" || echo "$rpcdstr" | grep -q "Failed to connect to ubus" || echo "$rpcdstr" | grep -q "inactive"; then + ubusval=$(/etc/init.d/dbus status 2>&1) + if echo "$ubusval" | grep -q "Failed" || echo "$ubusval" | grep -q "Failed to connect to ubus" || echo "$ubusval" | grep -q "inactive"; then killall ubusd 2>/dev/null sleep 1 /sbin/rpcd -s /var/run/ubus/ubus.sock -t 30 &