From 1725b087b6fad3ca686af07c0c4bc5a3ad2f5ec1 Mon Sep 17 00:00:00 2001 From: lizw <1183409807@qq.com> Date: Mon, 26 Jun 2023 14:46:48 +0800 Subject: [PATCH] 05wms-ztf-test.sh --- hua_wei_yun/05wms-ztf-test.sh | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/hua_wei_yun/05wms-ztf-test.sh b/hua_wei_yun/05wms-ztf-test.sh index ea8e907..6c81242 100644 --- a/hua_wei_yun/05wms-ztf-test.sh +++ b/hua_wei_yun/05wms-ztf-test.sh @@ -222,20 +222,36 @@ startPcUi() { nohup yarn run dev >>/dev/null 2>&1 & } +#startMobileUi() { +# pid=`ps -ef | grep "${codePath}/wms-ui-mobile/node_modules/.bin/vite" | grep -v 'grep' | awk '{print $2}'` +# if [ -z $pid ];then +# echo "wms-ui-mobile 未运行" +# else +# echo -e "$echoPrefix ps -ef | grep "${codePath}/wms-ui-mobile/node_modules/.bin/vite" | grep -v 'grep' | awk '{print \$2}' | xargs kill $echoSuffix" +# ps -ef | grep "${codePath}/wms-ui-mobile/node_modules/.bin/vite" | grep -v 'grep' | awk '{print $2}' | xargs kill +# echo "wms-ui-mobile 已停止!" +# sleep 3s +# fi +# echo -e "$echoPrefix cd $codePath/wms-ui-mobile $echoSuffix" +# cd "$codePath/wms-ui-mobile" +# echo -e "$echoPrefix nohup yarn run dev >>/dev/null 2>&1 & $echoSuffix" +# nohup yarn run dev >>/dev/null 2>&1 & +#} + startMobileUi() { - pid=`ps -ef | grep "${codePath}/wms-ui-mobile/node_modules/.bin/vite" | grep -v 'grep' | awk '{print $2}'` + pid=`ps -ef | grep 'node server.js -P 8092' | grep -v 'grep' | awk '{print $2}'` if [ -z $pid ];then echo "wms-ui-mobile 未运行" else - echo -e "$echoPrefix ps -ef | grep "${codePath}/wms-ui-mobile/node_modules/.bin/vite" | grep -v 'grep' | awk '{print \$2}' | xargs kill $echoSuffix" - ps -ef | grep "${codePath}/wms-ui-mobile/node_modules/.bin/vite" | grep -v 'grep' | awk '{print $2}' | xargs kill + echo -e "$echoPrefix ps -ef | grep 'node server.js -P 8092' | grep -v 'grep' | awk '{print \$2}' | xargs kill $echoSuffix" + ps -ef | grep 'node server.js -P 8092' | grep -v 'grep' | awk '{print $2}' | xargs kill echo "wms-ui-mobile 已停止!" sleep 3s fi echo -e "$echoPrefix cd $codePath/wms-ui-mobile $echoSuffix" cd "$codePath/wms-ui-mobile" - echo -e "$echoPrefix nohup yarn run dev >>/dev/null 2>&1 & $echoSuffix" - nohup yarn run dev >>/dev/null 2>&1 & + echo -e "$echoPrefix nohup node server.js -P 8092 >>/dev/null 2>&1 & $echoSuffix" + nohup node server.js -P 8092 >>/dev/null 2>&1 & } pid=`ps -ef | grep "DappName=${serverName}" | grep -v 'grep' | awk '{print $2}'`