telegram-cli-bot/telegram-bot.service

26 lines
512 B
INI
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[Unit]
Description=Telegram CLI Bot
After=network.target
[Service]
Type=simple
User=%USER%
WorkingDirectory=%WORKDIR%
Environment="PATH=%VENV_PATH%"
ExecStart=%VENV_PATH%/python bot.py
Restart=always
RestartSec=10
StandardOutput=journal
StandardError=journal
SyslogIdentifier=telegram-bot
# Security hardening с исключениями для работы бота
NoNewPrivileges=true
ProtectSystem=strict
ProtectHome=read-only
PrivateTmp=true
ReadWritePaths=%WORKDIR%
[Install]
WantedBy=multi-user.target