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
socrates@luxemburg ae062c1e04 initial commit
2023-12-22 21:04:08 +01:00

30 lines
505 B
Bash
Executable File

#!/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