I all,
I wrote an script which starts a Weblogic server and waits until its loaded to deploy several apps. The way I checked was something like:
[...]
while [ $rc -ne 0 ]; do
wget --spider <URL>:<port>/console > /dev/null 2>&1
rc=$?
done
[...]
This works perfectly because it's an HTML site and when server is started the site is accessible.
Now I need to do the same, but I also need to wait for server instances, which listens at same URL but different port than Server.
I can't use return code of wget because it always return 1.
If instance is up, wget responses:
If instance is down:
The return code is always 1 because although it was listening there is no HTML web to view as server has.
So how can I check if instance is available or not? Any other bash command to check an URL and port?
Thanks a lot and sorry for english