Select Git revision
Forked from
KIF / AKPlanning
Source project has a limited visibility.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
run.sh 699 B
#!/bin/sh
cd /usr/src/app
if [ -z "${TO_MAIL}" ]
then
echo "TO_MAIL not set."
exit 1
fi
function preview {
(>&2 echo "run twitter")
python3 twitter_bot.py --nofailmessage --daydiff 2
echo ""
(>&2 echo "run telegram")
python3 telegram_bot.py --nofailmessage --daydiff 2
echo ""
(>&2 echo "run twitter as doit")
python3 twitter_bot.py --nofailmessage --daydiff 1 --doit
echo ""
(>&2 echo "run telegram as doit")
python3 telegram_bot.py --nofailmessage --daydiff 1 --doit
echo ""
}
(cat << EOF
Subject: Programm-Info-Bot
Content-Type: text/plain; charset=UTF-8
To: ${TO_MAIL}
$(preview)
EOF
) | msmtp ${MSMTP_ARGUMENTS} ${TO_MAIL}