initial commit

This commit is contained in:
socrates@luxemburg
2023-12-22 21:04:08 +01:00
commit ae062c1e04
5 changed files with 60 additions and 0 deletions

29
wohn-hh-checker.sh Executable file
View File

@@ -0,0 +1,29 @@
#!/bin/bash
mail="From: sockenklaus@gmail.com\n\
To: pascalkoenig@duck.com\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 -s --url 'smtps://smtp.gmail.com:465' \
--ssl-reqd --mail-from 'sockenklaus@gmail.com' \
--mail-rcpt 'pascalkoenig@duck.com' \
--user 'sockenklaus@gmail.com:gkrybqzhzkkggbrh' \
-T <(echo -e "$mail")
fi
fi
echo "$new" > old.html