Polling to check usbus service

This commit is contained in:
桐话
2024-06-09 16:41:09 +08:00
committed by GitHub
parent ad3d1b4869
commit 803d9b69ba
+20
View File
@@ -0,0 +1,20 @@
#!/bin/sh /etc/rc.common
START=99
STOP=11
start() {
/sbin/ubus-status.sh > /dev/null 2>&1 &
}
stop() {
pid=$(pgrep "ubus-status" | head -n 1)
if [ -n "$pid" ]; then
kill -9 "$pid"
fi
}
restart() {
stop
start
}