ub4tg/installing-on-termux.md

1.2 KiB

Termux apk here: https://f-droid.org/repo/com.termux_1020.apk
Termux:API apk if you want get notifications about updates of this code: https://f-droid.org/repo/com.termux.api_51.apk

  1. Optional step: allow permission on storage in Termux before start, after this, step 3-4 can be skipped
  2. Run termux and enter this oneliner:
    pkg update && pkg upgrade && pkg install openssl python3 git termux-api && git clone https://code.criminallycute.fi/bioeb_org/ub4tg/ && cd ub4tg && pip3 install -r requirements.txt
    If pkg upgrade ask overwrite some files - press Y
  3. Now after this you can run bot:
    ./run or python3 ubot.py
  4. Termux will ask permission on storage, allow it. Restart Termux (enter quit or press CTRL+d)
  5. Run bot again:
    cd ub4tg; ./run
  6. Follow first time setup, it creates config for you and asks some questions
  7. Enjoy
  8. If you get some warnings about future events: sync your time in Android settings "date and time" and switch "network time" off/on

For start bot again (if Termux restarted) just enter:
cd ub4tg; ./run
For fast access to bot, make alias:
echo "alias ub4tg='cd ~/ub4tg; ./run'" >> .bashrc
then
source ~/.bashrc
Now you can run bot in everywhere directory, just enter: ub4tg