How to Check Site Availability Status from Bash
How to Check Site Availability Status from Bash
sanchita sengupta no responses

Here we try to establish a way using bash script that will check sites and its present title in regular interval of time ( as we fixed a cron job ) and revert a mail on getting any change, for this we are storing site’s Url and Title in database and using the bash script and Casper’s  getTitle function matching each url’s current title with stored title one by one. 

A little glimpse of code :

we are having url from database into variable ‘url’ now we are getting title of particular into variable ‘db_title’ , we will pass this url as an argument to Casper function :

Casper code is as bellow:

then we match the title stored in title of database and current title sent by the casperjs , if they both matches the process will continue else inform with a mail.

that is all the logic behind the script….

KINDLY CONTACT US IF THERE IS ANY QUERY


Leave A Response

Your email address will not be published. Required fields are marked *

Please verify that you are not a robot.