tuon vor 1 Jahr
Ursprung
Commit
b8fff2cf52
1 geänderte Dateien mit 5 neuen und 2 gelöschten Zeilen
  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 &