Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 22 lines (19 sloc) 729 Bytes
#!/bin/bash
set -e -f -u -o pipefail
SENTINEL='<title>Ariane Tobin Jewellery - Ariane Tobin Jewellery</title>'
WEBSITE='https://www.arianetobin.ie/'
readonly SENTINEL WEBSITE
# Try multiple times to cover for bad internet at home.
# shellcheck disable=SC2034
for i in $(seq 1 5); do
# Redirect to /dev/null rather than using -q: using -q means grep will exit
# immediately if a match is found, and then curl can't finish writing to the
# pipe so it produces an error message, whereas without -q grep will process
# all the input.
if curl --silent "${WEBSITE}" | grep -F -i "${SENTINEL}" > /dev/null; then
exit 0
fi
sleep 600
done
printf "Did not find sentinel '%s' in %s\\n" "${SENTINEL}" "${WEBSITE}"
exit 1
You can’t perform that action at this time.