[Unit]
Description=SHiNE Agent Bot Coder (Telegram + Codex queue worker)
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
User=your_user
Group=your_user
WorkingDirectory=/home/your_user/codex-agent
Environment=HOME=/home/your_user
Environment=PATH=/home/your_user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
EnvironmentFile=/home/your_user/codex-agent/.env
ExecStart=/usr/bin/python3 /home/your_user/codex-agent/py_bot_service.py
Restart=always
RestartSec=5
TimeoutStopSec=20
SuccessExitStatus=143 0
StandardOutput=append:/home/your_user/codex-agent/logs/service.log
StandardError=append:/home/your_user/codex-agent/logs/service.log

[Install]
WantedBy=multi-user.target
