Bash: check if site is up or down

I have a few self hosted sites and I have been looking for a way to monitor the site statuses in a way that I will get an email when a site is down and another one once that site is back up again. So I decided to write a little bash script that can run on my home linux server. Here is the code:

This bash script can also run on Mac or Windows. Bash comes standard on Mac OSX. On windows you will need to install Bash and other GNU tools. I might do a post on how to set this up later. The sendEmail program used in the script did not come standard on my linux box, but it was easily installed with one command line:

sudo apt-get install sendemail

The sendEmail website can be found here.


Popular post

Which Forex Pairs are Generally Trending and Which Ones Tend to Revert to the Mean

Build more wealth with gold

Get links to data referenced by