Files
Actions-iStoreOS-RK35XX/configfiles/httpubus
T
2024-06-20 10:03:32 +08:00

38 lines
575 B
Bash

#!/bin/sh /etc/rc.common
START=99
STOP=11
board_name() {
[ -e /tmp/sysinfo/board_name ] && cat /tmp/sysinfo/board_name || echo "generic"
}
check_model() {
local board=$(board_name)
case "$board" in
jp,tvbox|\
panther,x2)
/sbin/ubus-status.sh > /dev/null 2>&1 &
;;
*)
return 1
;;
esac
}
start() {
check_model
}
stop() {
local pidcount=$(pgrep "ubus-status" | wc -l)
if [ "$pidcount" -eq 1 ]; then
killall -9 ubus-status
fi
}
restart() {
stop
start
}