Update mw.tpl

pull/445/head
midoks 2 years ago
parent a767e7e578
commit 021b299b7d
  1. 12
      scripts/init.d/mw.tpl

@ -106,16 +106,20 @@ mw_stop_task()
mw_stop_panel()
{
echo -e "stopping mw-panel... \c";
pidfile=${mw_path}/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[@]}
do
kill -9 $p > /dev/null 2>&1
done
pidfile=${mw_path}/logs/mw.pid
if [ -f $pidfile ];then
rm -f $pidfile
fi
echo -e "\033[32mdone\033[0m"
}

Loading…
Cancel
Save