Advertisement
Guest User

Untitled

a guest
Nov 14th, 2017
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.70 KB | None | 0 0
  1. root@xxxx:~# cat /etc/systemd/system/discobot.service
  2. [Unit]
  3. Description=Discord Bot service
  4.  
  5. [Service]
  6. User=discobot
  7. Group=discobot
  8. ExecStart=/home/discobot/runbot.sh
  9. WorkingDirectory=/home/discobot
  10.  
  11. [Install]
  12. WantedBy=multi-user.target
  13.  
  14.  
  15. root@xxxx:~# cat /home/discobot/runbot.sh
  16. #!/bin/bash
  17. set -e -o pipefail
  18.  
  19. echo starting up at `date`
  20. export HOME=/home/discobot
  21. source venv/bin/activate
  22. cd discord-reddit-feedbot
  23. git pull
  24. pip install -r requirements.txt  # this is the source of all the "requirement satisfied" messages below - logging works up to this point
  25. python main.py
  26.  
  27.  
  28. root@ubuntu-512mb-sgp1-01:~# systemctl status discobot
  29. ● discobot.service - Discord Bot service
  30.    Loaded: loaded (/etc/systemd/system/discobot.service; disabled; vendor preset: enabled)
  31.    Active: active (running) since Wed 2017-11-15 04:27:38 UTC; 16min ago
  32.  Main PID: 5868 (runbot.sh)
  33.     Tasks: 5
  34.    Memory: 24.1M
  35.       CPU: 5.130s
  36.    CGroup: /system.slice/discobot.service
  37.            ├─5868 /bin/bash /home/discobot/runbot.sh
  38.            └─5890 python main.py
  39.  
  40. Nov 15 04:27:41 xxxx runbot.sh[5868]: Requirement already satisfied: discord==0.0.2 in /home/discobot/venv/lib/python3.5/site-packa
  41. Nov 15 04:27:41 xxxx runbot.sh[5868]: Requirement already satisfied: discord.py==0.16.12 in /home/discobot/venv/lib/python3.5/site-
  42. Nov 15 04:27:41 xxxx runbot.sh[5868]: Requirement already satisfied: idna==2.6 in /home/discobot/venv/lib/python3.5/site-packages (
  43. Nov 15 04:27:41 xxxx runbot.sh[5868]: Requirement already satisfied: multidict==3.3.2 in /home/discobot/venv/lib/python3.5/site-pac
  44. Nov 15 04:27:41 xxxx runbot.sh[5868]: Requirement already satisfied: praw==5.2.0 in /home/discobot/venv/lib/python3.5/site-packages
  45. Nov 15 04:27:41 xxxx runbot.sh[5868]: Requirement already satisfied: prawcore==0.12.0 in /home/discobot/venv/lib/python3.5/site-pac
  46. Nov 15 04:27:41 xxxx runbot.sh[5868]: Requirement already satisfied: requests==2.18.4 in /home/discobot/venv/lib/python3.5/site-pac
  47. Nov 15 04:27:41 xxxx runbot.sh[5868]: Requirement already satisfied: update-checker==0.16 in /home/discobot/venv/lib/python3.5/site
  48. Nov 15 04:27:41 xxxx runbot.sh[5868]: Requirement already satisfied: urllib3==1.22 in /home/discobot/venv/lib/python3.5/site-packag
  49. Nov 15 04:27:41 xxxx runbot.sh[5868]: Requirement already satisfied: websockets==3.4 in /home/discobot/venv/lib/python3.5/site-pack
  50.  
  51. <There should be some "Bot started, connected to discord, my discord name is blahdeblah" but there's not. The bot is definitely running and responding via Discord as intended, but it's not logging the messages it's sending. Normally they would be print()'d from python and would show up in terminal out when manually running this.>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement