How to Check Site Availability Status from Bash

Updated 14 June 2017

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

Category(s) linux
author
. . .

Leave a Comment

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


Be the first to comment.

Start a Project




    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home