Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- root@xxxx:~# cat /etc/systemd/system/discobot.service
- [Unit]
- Description=Discord Bot service
- [Service]
- User=discobot
- Group=discobot
- ExecStart=/home/discobot/runbot.sh
- WorkingDirectory=/home/discobot
- [Install]
- WantedBy=multi-user.target
- root@xxxx:~# cat /home/discobot/runbot.sh
- #!/bin/bash
- set -e -o pipefail
- echo starting up at `date`
- export HOME=/home/discobot
- source venv/bin/activate
- cd discord-reddit-feedbot
- git pull
- pip install -r requirements.txt # this is the source of all the "requirement satisfied" messages below - logging works up to this point
- python main.py
- root@ubuntu-512mb-sgp1-01:~# systemctl status discobot
- ● discobot.service - Discord Bot service
- Loaded: loaded (/etc/systemd/system/discobot.service; disabled; vendor preset: enabled)
- Active: active (running) since Wed 2017-11-15 04:27:38 UTC; 16min ago
- Main PID: 5868 (runbot.sh)
- Tasks: 5
- Memory: 24.1M
- CPU: 5.130s
- CGroup: /system.slice/discobot.service
- ├─5868 /bin/bash /home/discobot/runbot.sh
- └─5890 python main.py
- 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
- 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-
- Nov 15 04:27:41 xxxx runbot.sh[5868]: Requirement already satisfied: idna==2.6 in /home/discobot/venv/lib/python3.5/site-packages (
- 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
- 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
- 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
- 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
- Nov 15 04:27:41 xxxx runbot.sh[5868]: Requirement already satisfied: update-checker==0.16 in /home/discobot/venv/lib/python3.5/site
- Nov 15 04:27:41 xxxx runbot.sh[5868]: Requirement already satisfied: urllib3==1.22 in /home/discobot/venv/lib/python3.5/site-packag
- Nov 15 04:27:41 xxxx runbot.sh[5868]: Requirement already satisfied: websockets==3.4 in /home/discobot/venv/lib/python3.5/site-pack
- <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