Bash script to monitor website updates on specific words

#!/bin/bash
CTR=0

while true
do
    HOST="https://target-url-to-monitor.com"
    RESULT1="$(curl -s $HOST | grep 'your-specific-keywords')"
    if [[ ! -z ${RESULT1} ]]; then
        CTR=$[$CTR+1]
        break
    else
        sleep 900
    fi
done

if [[ $CTR -gt '0' ]]; then
    echo -e "$CTR matching results for your-specific-keywords" | mail -s "Your Email Subject" your@emailaddress.com
fi

Bash script to auto-update Dynamic DNS on FreeDNS

This bash script is especially useful when your router default dynamic dns function updates is not consistent and require reboot in order for it to update.

If you have a home machine that runs 24/7 connected to Internet, you can schedule a cronjob to execute this script on every 1 hour so your domain/subdomain always get updated with the latest dynamic IP.

#!/bin/bash

if test -f /root/freedns/freedns-last-ip.conf
then
	CacheIP=$(cat /root/freedns/freedns-last-ip.conf)
fi

CurreIP=$(wget http://freedns.afraid.org/dynamic/check.php -o /dev/null -O /dev/stdout | grep Detected | cut -d : -f 2 | cut -d '<' -f 1 | tr -d " ")

if [ "$CurreIP" = "$CacheIP" ]
then
	echo "Update not required..."
else
	echo "Updating http://free.afraid.org with " $CurreIP
	wget https://freedns.afraid.org/dynamic/update.php?insertyourapicode -o /dev/null -O /dev/stdout
	echo `date` "Updating log with IP " $CurreIP >> /root/freedns/freedns-upd.log
fi

rm -f /root/freedns/freedns-last-ip.conf
echo $CurreIP > /root/freedns/freedns-last-ip.conf