Python
9
Вклад в тег
sudo touch /etc/systemd/system/bot.service
[Unit]
Description=My bot
After=multi-user.target
[Service]
Type=idle
ExecStart=/usr/bin/python /путь/до/скрипта/bot.py
Restart=always
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable bot.service
sudo systemctl start bot.service
sudo systemctl stop bot.service
sudo systemctl disable bot.service
sudo systemctl status bot.service