- добавление скриптов для systemd
This commit is contained in:
33
bot-news-linux-gaming.service
Normal file
33
bot-news-linux-gaming.service
Normal file
@@ -0,0 +1,33 @@
|
||||
[Unit]
|
||||
Description=Linux Gaming News Bot
|
||||
Documentation=https://github.com/xpamych/bot-news-linux-gaming
|
||||
After=network.target network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=xpamych
|
||||
Group=xpamych
|
||||
WorkingDirectory=/home/xpamych/Yandex.Disk/IdeaProjects/bot-news-linux-gaming
|
||||
ExecStart=/usr/bin/python3 /home/xpamych/Yandex.Disk/IdeaProjects/bot-news-linux-gaming/news-bot-modular.py
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
|
||||
# Переменные окружения
|
||||
Environment=PYTHONPATH=/home/xpamych/Yandex.Disk/IdeaProjects/bot-news-linux-gaming
|
||||
Environment=PYTHONUNBUFFERED=1
|
||||
|
||||
# Ограничения безопасности
|
||||
NoNewPrivileges=yes
|
||||
PrivateTmp=yes
|
||||
ProtectSystem=strict
|
||||
ProtectHome=read-only
|
||||
ReadWritePaths=/home/xpamych/Yandex.Disk/IdeaProjects/bot-news-linux-gaming
|
||||
|
||||
# Логирование
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
SyslogIdentifier=news-bot
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Reference in New Issue
Block a user