Katello/katello — pull request #1836 by iNecas (2013-04-03 12:25:37+00:00)
Title: 903388 - fix service-wait script

wget was not recovering from 'Unable to establish SSL connection.' type of
errors. That caused the script exited with success although the service was
not ready yet (the sleep timeout set for 5 seconds was not enough).

The fix is to use curl to double check the response for test url (curl is able
to retry form SSL issues).

Also the script exists with non-zero when the test url can't be reached: when
the script succeeds after start, we want to be sure that the service is really
up and running. Otherwise it should fail.

The curl fix should also make the `sleep $ADDITIONAL_TIME` useless (as this
was probably meant to fix the original issue with SSL). Removing, to eliminate
magic constants and speed up the script a bit.