Bläddra i källkod

04wms-ztf-test.sh

lizw 2 år sedan
förälder
incheckning
0600b0f387
1 ändrade filer med 13 tillägg och 2 borttagningar
  1. 13 2
      hua_wei_yun/04wms-ztf-test.sh

+ 13 - 2
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}'`