Skip to main content

Posts

Showing posts from August, 2015

Shell script to wait until your site becomes reachable and returns code 200

Sometimes you don't know when a server becomes reachable and you just need to wait, while continuously pinging it with a certain interval. This is a shell script that does everything for you (including a timeout if host is not available during a specified period of time). It accepts two parameters: hostname of your site and a timeout in seconds.