From 62688062a7ef553bcd5e63b359ba56953674b1bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A1=90=E8=AF=9D?= <49544781+xiaomeng9597@users.noreply.github.com> Date: Fri, 25 Oct 2024 02:28:51 -0500 Subject: [PATCH] update httpubus --- configfiles/httpubus | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/configfiles/httpubus b/configfiles/httpubus index 1e67c7f..1a0f7a7 100644 --- a/configfiles/httpubus +++ b/configfiles/httpubus @@ -25,13 +25,22 @@ start() { } stop() { - local pidcount=$(pgrep "ubus-examine" | wc -l) - if [ "$pidcount" -eq 0 ]; then - pidcount=$(pgrep "ubus-examine.sh" | wc -l) - fi - if [ "$pidcount" -gt 0 ]; then - killall -9 ubus-examine ubus-examine.sh 2>/dev/null - fi + local board=$(board_name) + case "$board" in + jp,tvbox|\ + panther,x2) + local pidcount=$(pgrep "ubus-examine" | wc -l) + if [ "$pidcount" -eq 0 ]; then + pidcount=$(pgrep "ubus-examine.sh" | wc -l) + fi + if [ "$pidcount" -gt 0 ]; then + killall -9 ubus-examine ubus-examine.sh 2>/dev/null + fi + ;; + *) + return 1 + ;; + esac } restart() {