From 0600b0f387336e9ff7c1b1e5379a81711b299d00 Mon Sep 17 00:00:00 2001 From: lizw <1183409807@qq.com> Date: Wed, 12 Apr 2023 11:58:42 +0800 Subject: [PATCH] 04wms-ztf-test.sh --- hua_wei_yun/04wms-ztf-test.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/hua_wei_yun/04wms-ztf-test.sh b/hua_wei_yun/04wms-ztf-test.sh index 6d1f58f..8add76d 100644 --- a/hua_wei_yun/04wms-ztf-test.sh +++ b/hua_wei_yun/04wms-ztf-test.sh @@ -207,16 +207,27 @@ deployYvanUI() { } startPcUi() { + pid=`ps -ef | grep "${codePath}/wms-ui-pc/node_modules/.bin/vite" | grep -v 'grep' | awk '{print $2}'` + if [ -z $pid ];then + echo "wms-ui-pc 未运行" + else + echo -e "$echoPrefix ps -ef | grep "${codePath}/wms-ui-pc/node_modules/.bin/vite" | grep -v 'grep' | awk '{print \$2}' | xargs kill $echoSuffix" + ps -ef | grep "${codePath}/wms-ui-pc/node_modules/.bin/vite" | grep -v 'grep' | awk '{print $2}' | xargs kill + echo "wms-ui-pc 已停止!" + sleep 3s + fi echo -e "$echoPrefix cd $codePath/wms-ui-pc $echoSuffix" cd "$codePath/wms-ui-pc" - - + echo -e "$echoPrefix nohup yarn run dev >>/dev/null 2>&1 & $echoSuffix" + nohup yarn run dev >>/dev/null 2>&1 & } startMobileUi() { echo -e "$echoPrefix cd $codePath/wms-ui-mobile $echoSuffix" cd "$codePath/wms-ui-mobile" + + } pid=`ps -ef | grep "DappName=${serverName}" | grep -v 'grep' | awk '{print $2}'`