echo "YOUR_TOKEN_FROM_BotFather" > token.txt
python3 -m venv ./venv
./venv/bin/pip install -r requirements.txt
./venv/bin/python mlg_jvn_bot.py
Create file /etc/systemd/system/my_mlg_jvn_bot.service
with the following content (change <path_to>
):
[Service]
WorkingDirectory=/home/<user>/<path_to>/mlg-jvn-bot/
ExecStart=/home/<user>/<path_to>/mlg-jvn-bot/venv/bin/python mlg_jvn_bot.py
User=root
Restart=always
[Install]
WantedBy=multi-user.target
sudo systemctl start my_mlg_jvn_bot.service
systemctl status my_mlg_jvn_bot.service
sudo journalctl -u my_mlg_jvn_bot.service