![python](https://habrastorage.org/r/w120/webt/5a/de/0e/5ade0efe6f5d5276653463.png)
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