f83ebf5854
systemd --user unit, polls famzheng.me/gitea every 60s, dispatches `claude --dangerously-skip-permissions -p ...` per new activity. sqlite state, log to ~/.local/state/gitea-bot/bot.log.
19 lines
593 B
Desktop File
19 lines
593 B
Desktop File
[Unit]
|
|
Description=gitea-bot — mochi 全站 issue/PR 自动处理
|
|
After=network-online.target
|
|
Wants=network-online.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
ExecStart=/usr/bin/python3 /home/fam/src/gitea-bot/bot.py
|
|
Restart=on-failure
|
|
RestartSec=15
|
|
# claude / git / curl / node 等都在 PATH 里
|
|
Environment=PATH=/home/fam/.local/bin:/home/fam/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
|
Environment=HOME=/home/fam
|
|
StandardOutput=append:/home/fam/.local/state/gitea-bot/bot.log
|
|
StandardError=append:/home/fam/.local/state/gitea-bot/bot.log
|
|
|
|
[Install]
|
|
WantedBy=default.target
|