Skip to content
Snippets Groups Projects
Select Git revision
  • 125c81cb78217724f6c60ada81573bc6319ddb9f
  • master default protected
  • renovate/configure
3 results

run.sh

Blame
  • Forked from Uni-Film-Club / Programm-Info-Bot
    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}