Posts

Showing posts from September, 2023

Google's 25th Birthday - Google turns 25, celebrates birthday with a doodle.

Image
Google, everyone's favourite search engine, turned 25 years old on Wednesday and is celebrating its birthday with a doodle. Taking a “walk down memory lane”, the company showcased different doodles on its birthday over the years. The latest one comes with a GIF which turns ‘Google’ into ‘G25gle’ - marking the 25 years.

Shell script to check domain expiry date and send alerts to Slack on Ubuntu

  1. Create a file with list of domain names vi /home/ubuntu/domain_names.txt example.com example.in example.org exp123.com 2. Create a shell script for domain expiry check vi /home/ubuntu/domain-expiry-check.sh #!/bin/bash #Specify all the domains you want to check WEBSITE_LIST=` cat /home/ubuntu/domain_names.txt` #WEBSITE_LIST MAX_DAYS=30 MIN_DAYS=1 current_epoch=$( date '+%s' ) for dm in $WEBSITE_LIST do expiry_date=$(curl -s https://www.whatsmydns.net/api/domain?q= $dm | jq --raw-output '.[].expires | select( . != null )' ) echo -n " $dm - Expires on $expiry_date " expiry_epoch=$( date -- date = " $expiry_date " '+%s' ) epoch_diff=$((expiry_epoch - current_epoch)) days=$((epoch_diff / 86400 )) if [[ $days -lt $MAX_DAYS && $days -gt $MIN_DAYS ]]; then echo -n " $dm - Expires on $expiry_date and $days days remaining. " curl -X POST -H 'Content-type: application/json' -...