Skip to content

Commit

Permalink
Update mw.tpl
Browse files Browse the repository at this point in the history
  • Loading branch information
midoks committed Dec 20, 2024
1 parent 784629f commit c31af5c
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions scripts/init.d/mw.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,16 @@ mw_stop_task()
fi

echo -e "stopping mw-tasks... \c";
pids=$(ps aux | grep 'panel_task.py'|grep -v grep|awk '{print $2}')
arr=($pids)
for p in ${arr[@]}
panel_task=$(ps aux | grep 'panel_task.py'|grep -v grep|awk '{print $2}')
panel_task=($panel_task)
for p in ${panel_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[@]}
zzpids=($zzpids)
for p in ${zzpids[@]}
do
kill -9 $p > /dev/null 2>&1
done
Expand All @@ -129,27 +129,26 @@ mw_stop_task()
mw_stop_panel()
{
echo -e "stopping mw-panel... \c";

pidfile=${PANEL_DIR}/logs/mw.pid
if [ -f $pidfile ];then
pid=`cat $pidfile`
kill -9 $pid > /dev/null 2>&1
rm -f $pidfile
fi

ARR=`ps aux|grep 'gunicorn -c setting.py app:app'|grep -v grep|awk '{print $2}'`
for p in ${ARR[@]}
APP_LIST=`ps aux|grep 'gunicorn -c setting.py app:app'|grep -v grep|awk '{print $2}'`
APP_LIST=($APP_LIST)
for p in ${APP_LIST[@]}
do
kill -9 $p > /dev/null 2>&1
done

PLIST=`ps -ef|grep app:app |grep -v grep|awk '{print $2}'`
ARR=($PLIST)
for i in ${ARR[@]}
APP_LIST=`ps -ef|grep app:app |grep -v grep|awk '{print $2}'`
APP_LIST=($APP_LIST)
for i in ${APP_LIST[@]}
do
kill -9 $i > /dev/null 2>&1
done

echo -e "\033[32mdone\033[0m"
}

Expand Down

0 comments on commit c31af5c

Please sign in to comment.