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}'`