Browse Source

Added a run loop in bash script

Suren A. Chilingaryan 4 years ago
parent
commit
4c266b96ca
1 changed files with 9 additions and 0 deletions
  1. 9 0
      startup.sh

+ 9 - 0
startup.sh

@@ -41,3 +41,12 @@ if ! screen -list | grep -q "Bernhard04"; then
     )
 fi
 
+sleep 10
+
+num=$(ps xa | grep python | grep -v grep | wc -l)
+while [ $num -eq 6 ]; do
+    echo "All 5 instances are running..."
+    sleep 3600
+
+    num=$(ps xa | grep python | grep -v grep | wc -l)
+done