[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