Maki is a Discord bot that does things. Written in Python 3 and relies on Discord.py API implementation.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
703B

  1. #!/bin/bash
  2. # user to effectively run bot as (so we can safely run as root for pip)
  3. puser="admin"
  4. while :
  5. do
  6. date
  7. echo Updating repository...
  8. runuser -m $puser -c 'git pull origin master'
  9. # if root we can update discord.py
  10. if [ "$EUID" -eq 0 ]
  11. then
  12. echo Updating discord.py...
  13. python3 -m pip install -U https://github.com/Rapptz/discord.py/archive/master.zip#egg=discord.py[voice]
  14. fi
  15. echo Starting Maki...
  16. runuser -m $puser -c 'rm -f ./reload'
  17. runuser -m $puser -c 'python3 bot.py'
  18. # okay to quit if there is no reload file
  19. if [ ! -f ./reload ]
  20. then
  21. echo no reload file, stopping for realsies...
  22. exit
  23. fi
  24. done