Sfoglia il codice sorgente

update stop script

rainbow954 7 anni fa
parent
commit
db7c102795
1 ha cambiato i file con 9 aggiunte e 1 eliminazioni
  1. 9 1
      src/bin/stop.sh

+ 9 - 1
src/bin/stop.sh

@@ -1,2 +1,10 @@
 #!/bin/bash
-kill  `ps -ef|grep data-acceptance.jar| grep -v grep| awk '{print $2}'`
+PID=`ps -ef|grep data-acceptance.jar| grep -v grep| awk '{print $2}'`
+
+if [!-f ${PID})];then
+  echo "进程不存在"
+else
+  kill  $PID
+  echo "正在关闭进程"
+  sleep 5
+fi