This repository has been archived on 2025-07-03. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
wohn-hh-checker/wohn-hh-checker.sh
2023-12-23 00:54:57 +01:00

35 lines
572 B
Bash
Executable File

#!/bin/bash
from="sockenklaus@gmail.com"
rcpt="pascalkoenig@duck.com;sandra.suehl@web.de"
mail="From: $from\n\
To: $rcpt\n\
Subject: wohn-hh.de changed\n\
\n\
Visit: http://wohn-hh.de"
new=$(curl -s http://wohn-hh.de)
if [ -f "old.html" ]; then
old=$(<old.html)
if [[ "$old" != "$new" ]]; then
curl --url 'smtps://smtp.gmail.com:465' \
--ssl-reqd --mail-from "$from" \
--mail-rcpt 'pascalkoenig@duck.com' \
--mail-rcpt 'sandra.suehl@web.de' \
--user 'sockenklaus@gmail.com:gkrybqzhzkkggbrh' \
-T <(echo -e "$mail")
fi
fi
echo "$new" > old.html