From 45d997535de905f36f98148c9418a968d2fee7e3 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, 21 Jun 2024 22:12:12 +0800 Subject: [PATCH] update httpubus --- configfiles/httpubus | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/configfiles/httpubus b/configfiles/httpubus index b2e9846..20cffed 100644 --- a/configfiles/httpubus +++ b/configfiles/httpubus @@ -26,8 +26,11 @@ start() { stop() { local pidcount=$(pgrep "ubus-status" | wc -l) - if [ "$pidcount" -eq 1 ]; then - killall -9 ubus-status + if [ "$pidcount" -eq 0 ]; then + local pidcount=$(pgrep "ubus-status.sh" | wc -l) + fi + if [ "$pidcount" -gt 0 ]; then + killall -9 ubus-status ubus-status.sh 2>/dev/null fi }