From 82e4e5c1d3fd2bfb7418e305ccf841e6759296fe Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Thu, 28 Nov 2024 20:39:52 +0800 Subject: [PATCH] Update mw.tpl --- scripts/init.d/mw.tpl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/init.d/mw.tpl b/scripts/init.d/mw.tpl index 106ea781e..11d0c91d5 100755 --- a/scripts/init.d/mw.tpl +++ b/scripts/init.d/mw.tpl @@ -116,6 +116,13 @@ mw_stop_task() do kill -9 $p > /dev/null 2>&1 done + + zzpids=$(ps -A -o stat,ppid,pid,cmd | grep -e '^[Zz]' | awk '{print $2}') + arr=($zzpids) + for p in ${arr[@]} + do + kill -9 $p > /dev/null 2>&1 + done echo -e "\033[32mdone\033[0m" }