Standalone bot @arakawa_concierge_bot that silently records configured group chats into SQLite (FTS5). Phase 1 — capture only, no LLM, no auto-replies. Reads token + chat allowlist from /opt/chatlogger/env (NOT in git). Runs as systemd unit chatlogger-bot.service on CT 116 sharing /opt/bot-venv with the hausmeister-bot. - chatlogger_bot.py: telegram polling, message/edit handlers, admin cmds (/whichchat, /log_status, /recent, /search) — silent in groups - store.py: SQLite schema + FTS5 search + edit audit - query.py: CLI (recent, search, stats, chats, since, export JSONL) - chatlogger-bot.service: systemd unit, hardened (ProtectSystem=strict) - env.example, README.md Tested live: message 'hallo' from -1003924901022 stored, retrieved via CLI within seconds. Group privacy must be off in BotFather.
25 lines
637 B
Desktop File
25 lines
637 B
Desktop File
[Unit]
|
|
Description=Arakawa Concierge — passive Telegram group chat logger
|
|
After=network-online.target
|
|
Wants=network-online.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
WorkingDirectory=/opt/homelab-brain/chatlogger
|
|
EnvironmentFile=/opt/chatlogger/env
|
|
Environment=PYTHONUNBUFFERED=1
|
|
ExecStart=/opt/bot-venv/bin/python /opt/homelab-brain/chatlogger/chatlogger_bot.py
|
|
Restart=always
|
|
RestartSec=10
|
|
KillMode=control-group
|
|
TimeoutStopSec=10
|
|
|
|
# Hardening — bot only needs to read repo + write its own data dir.
|
|
ProtectSystem=strict
|
|
ReadWritePaths=/opt/chatlogger
|
|
ProtectHome=true
|
|
PrivateTmp=true
|
|
NoNewPrivileges=true
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|