title: Bash while loop with two string conditions
body: <p>I have run into a bit of a problem with my bash script. My script among other things is starting a server that takes some time to get going. In order to combat the long startup, I have put in a while loop that queries the server to see if its running yet.</p>
  
  <pre><code>while [ $running -eq 0 ]; do
  echo "===" $response "===";
  if [ "$response" == "" ] || [ "$response" == *"404 Not Found"* ]; then
      sleep 1;
      response=$(curl $ip:4502/libs/granite/core/content/login.html);
  else
     running=1;
  fi
  done
  </code></pre>
  
  <p>When exiting the loop $response equals the "404" string. If thats the case, the thing should still be in the loop, shouldn't it? Seems my loop is exiting prematurely.</p>
  
  <p>Joe</p>