You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
821 B
15 lines
821 B
#!/bin/zsh
|
|
mv /home/matt/drive/deployments/pvpr-checker/index.html /home/matt/drive/deployments/pvpr-checker/index_old.html
|
|
wget --no-check-certificate -O /home/matt/drive/deployments/pvpr-checker/index.html https://pvpr.com/
|
|
sitediff=$(diff /home/matt/drive/deployments/pvpr-checker/index.html /home/matt/drive/deployments/pvpr-checker/index_old.html | grep -o "/images\/program\/\w*.\w*")
|
|
echo ${#sitediff}
|
|
if [[ ${#sitediff} -gt 0 ]]
|
|
then
|
|
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="https://pvpr.com$sitediff"
|
|
fi
|