Browse Source

Don't use screen any more

Suren A. Chilingaryan 4 years ago
parent
commit
8168cb2c39
1 changed files with 13 additions and 13 deletions
  1. 13 13
      startup.sh

+ 13 - 13
startup.sh

@@ -1,51 +1,51 @@
 #!/bin/sh
 
 #screen -wipe
-if ! screen -list | grep -q "BernhardFront"; then
+#if ! screen -list | grep -q "BernhardFront"; then
     (
         cd BernhardFront/
 #        screen -d -m -S BernhardFront python start.py
         python start.py &
     )
-fi
+#fi
 
-if ! screen -list | grep -q "Bernhard01"; then
+#if ! screen -list | grep -q "Bernhard01"; then
     (
         cd Bernhard01/
 #        screen -d -m -S Bernhard01 python core.py
         python core.py &
     )
-fi
+#fi
 
-if ! screen -list | grep -q "Bernhard02"; then
+#if ! screen -list | grep -q "Bernhard02"; then
     (
         cd Bernhard02/
 #        screen -d -m -S Bernhard02 python core.py
         python core.py &
     )
-fi
+#fi
 
-if ! screen -list | grep -q "Bernhard03"; then
+#if ! screen -list | grep -q "Bernhard03"; then
     (
         cd Bernhard03/
 #        screen -d -m -S Bernhard03 python core.py
         python core.py &
     )
-fi
+#fi
 
-if ! screen -list | grep -q "Bernhard04"; then
+#if ! screen -list | grep -q "Bernhard04"; then
     (
         cd Bernhard04/
 #        screen -d -m -S Bernhard04 python core.py
         python core.py &
     )
-fi
+#fi
 
 sleep 10
 
-num=$(ps xa | grep python | grep -v grep | wc -l)
-while [ $num -eq 6 ]; do
-    echo "All 5 instances are running..."
+num=$(ps xa | grep core.py | grep -v grep | wc -l)
+while [ $num -eq 5 ]; do
+    echo "All 4 instances are running..."
     sleep 3600
 
     num=$(ps xa | grep python | grep -v grep | wc -l)