瀏覽代碼

启动脚本

tuon 1 年之前
父節點
當前提交
b8fff2cf52
共有 1 個文件被更改,包括 5 次插入2 次删除
  1. 5 2
      start.sh

+ 5 - 2
start.sh

@@ -1,3 +1,6 @@
 #!/bin/sh
-
-nohup python main.py &
+pid=$(ps -elf | grep $(pwd) | grep -v grep | awk '{print $4}')
+if [ "$pid"x != ""x ]; then
+    kill -9 $pid
+fi
+nohup python main.py --debug=false &