From a5f77a37f2139dd1a2ce8470ec273be574aec374 Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Fri, 21 Dec 2018 10:07:24 +0800 Subject: [PATCH] Update mw.tpl --- scripts/init.d/mw.tpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/init.d/mw.tpl b/scripts/init.d/mw.tpl index 1bb2cb333..e5ee95adf 100755 --- a/scripts/init.d/mw.tpl +++ b/scripts/init.d/mw.tpl @@ -7,8 +7,8 @@ mw_start(){ isStart=`ps -ef|grep 'gunicorn -c setting.py app:app' |grep -v grep|awk '{print $2}'` if [ "$isStart" == '' ];then echo -e "Starting mw... \c" - cd $mw_path && gunicorn -c setting.py app:app & - sleep 0.3 + cd $mw_path && gunicorn -c setting.py app:app + sleep 0.6 port=$(cat ${mw_path}/data/port.pl) isStart=$(lsof -i :$port|grep LISTEN) if [ "$isStart" == '' ];then @@ -100,7 +100,7 @@ mw_reload() do kill -9 $p done - cd $mw_path && gunicorn -c setting.py app:app & + cd $mw_path && gunicorn -c setting.py app:app isStart=`ps aux|grep 'gunicorn -c setting.py app:app'|grep -v grep|awk '{print $2}'` if [ "$isStart" == '' ];then echo -e "\033[31mfailed\033[0m"