update ubus-status.sh

This commit is contained in:
桐话
2024-06-29 22:13:13 +08:00
committed by GitHub
parent d2cb219248
commit 2739789675
+2 -2
View File
@@ -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 &