Browse code

update for why we sleep

Jesse Andrews authored on 2011/11/08 02:51:15
Showing 1 changed files
... ...
@@ -908,7 +908,10 @@ function screen_it {
908 908
     NL=`echo -ne '\015'`
909 909
     if [[ "$ENABLED_SERVICES" =~ "$1" ]]; then
910 910
         screen -S stack -X screen -t $1
911
-        sleep 0.5
911
+        # sleep to allow bash to be ready to be send the command - we are
912
+        # creating a new window in screen and then sends characters, so if
913
+        # bash isn't running by the time we send the command, nothing happens
914
+        sleep 1
912 915
         screen -S stack -p $1 -X stuff "$2$NL"
913 916
     fi
914 917
 }