sudo apt-get update
sudo apt-get install python3-venv
git clone https://github.com/zhulei1991/evrima_kook_bot.git
cd evrima_kook_bot
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
deactivate
sudo vi /etc/systemd/system/evrima_kook_bot.service
[Unit]
Description=Evrima KOOK Bot
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=always
RestartSec=1
User=USER_NAME
WorkingDirectory=/home/USER_NAME/evrima_kook_bot
ExecStart=/usr/bin/python3 /home/USER_NAME/evrima_kook_bot/main.py
Environment=PYTHONPATH=/home/USER_NAME/evrima_kook_bot/venv/lib/python3.10/site-packages
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
systemctl enable evrima_kook_bot.service
systemctl start evrima_kook_bot.service
systemctl status evrima_kook_bot.service
journalctl -u evrima_kook_bot.service
或者
vi evrima_kook_bot/logs/evrima_kook_bot.log