- добавление скриптов для systemd

This commit is contained in:
2025-08-11 16:12:47 +03:00
parent de5a5e9248
commit 50d505f887
8 changed files with 492 additions and 29 deletions

View 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