1#! /bin/bash
2# Script to check the Vicroads website and alert me when bookings for
3# license testing are open again.
45
recipient="andrew@lorimer.id.au"
6url="https://www.vicroads.vic.gov.au"
7phrase="No new appointments are available at this time"
89
if ! curl -l "$url" | grep "$phrase"; then
10echo -e "VicRoads appointments may be available" | mail -a "Importance: High" -a "Content-Type: text/plain; charset=UTF-8" -s "VicRoads Booking Check" $recipient
11fi