emails if change detected

master
Matthew Huntington 1 year ago
parent 8e7684def2
commit f6d4e353d1

@ -2,7 +2,13 @@
mv index.html index_old.html
wget --no-check-certificate https://pvpr.com/
sitediff=$(diff index.html index_old.html | grep "images\/program")
echo ${#sitediff}
if [[ ${#sitediff} -gt 0 ]]
then
echo "change"
curl -s --user 'api:key-8007cace8435d7c3bb1a2b16970edf3f' \
https://api.mailgun.net/v3/sandbox76e8cff3352449a2b366b9d9197cf7fa.mailgun.org/messages \
-F from='Mailgun Sandbox <postmaster@sandbox76e8cff3352449a2b366b9d9197cf7fa.mailgun.org>' \
-F to='Matt <matt.huntington@gmail.com>' \
-F subject='Change detected on PVPR.com' \
-F text="Change detected on PVPR.com"
fi

Loading…
Cancel
Save